From patchwork Mon May 30 21:21:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gerrit-no-reply@lists.osmocom.org X-Patchwork-Id: 627957 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (lists.osmocom.org [IPv6:2a01:4f8:191:444b::2:7]) by ozlabs.org (Postfix) with ESMTP id 3rJV100gZSz9t5q for ; Tue, 31 May 2016 07:21:24 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id A0158220A0; Mon, 30 May 2016 21:21:22 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from 127.0.1.12 (unknown [127.0.1.12]) by lists.osmocom.org (Postfix) with ESMTPA id 9D21722099; Mon, 30 May 2016 21:21:21 +0000 (UTC) Date: Mon, 30 May 2016 21:21:21 +0000 From: Holger Freyther To: Max X-Gerrit-MessageType: merged Subject: [MERGED] libosmocore[master]: Add strings with PH primitive names X-Gerrit-Change-Id: Id7a6d478fd725c51f54ad746bdf9b9095579ff77 X-Gerrit-ChangeURL: X-Gerrit-Commit: adef12a3497d14aafe677b77b468b952f4c6b5d5 In-Reply-To: References: MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/2.12.2-31-gb331dbd-dirty X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Development of OpenBSC, OsmoBSC, OsmoNITB, OsmoCSCN" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: holger@freyther.de Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" Message-Id: <20160530212122.A0158220A0@lists.osmocom.org> Holger Freyther has submitted this change and it was merged. Change subject: Add strings with PH primitive names ...................................................................... Add strings with PH primitive names It's useful debugging helper while troubleshooting L1-related issues. Change-Id: Id7a6d478fd725c51f54ad746bdf9b9095579ff77 Reviewed-on: https://gerrit.osmocom.org/117 Tested-by: Jenkins Builder Reviewed-by: Max Reviewed-by: Holger Freyther --- M include/osmocom/gsm/l1sap.h M src/gsm/lapdm.c M src/gsm/libosmogsm.map 3 files changed, 16 insertions(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/include/osmocom/gsm/l1sap.h b/include/osmocom/gsm/l1sap.h index 1af8ba8..ad942ea 100644 --- a/include/osmocom/gsm/l1sap.h +++ b/include/osmocom/gsm/l1sap.h @@ -14,6 +14,8 @@ PRIM_TCH_RTS, /*!< \brief TCH */ }; +extern const struct value_string osmo_ph_prim_names[]; + /*! \brief PH-SAP related primitives (L1<->L2 SAP) */ enum osmo_mph_info_type { PRIM_INFO_TIME, /*!< \brief Current GSM time */ diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index d44335f..fa7769b 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -111,6 +111,18 @@ LAPDm_FMT_B4, }; +const struct value_string osmo_ph_prim_names[] = { + { PRIM_PH_DATA, "PH-DATA" }, + { PRIM_PH_RACH, "PH-RANDOM_ACCESS" }, + { PRIM_PH_CONN, "PH-CONNECT" }, + { PRIM_PH_EMPTY_FRAME, "PH-EMPTY_FRAME" }, + { PRIM_PH_RTS, "PH-RTS" }, + { PRIM_MPH_INFO, "MPH-INFO" }, + { PRIM_TCH, "TCH" }, + { PRIM_TCH_RTS, "TCH-RTS" }, + { 0, NULL } +}; + static int lapdm_send_ph_data_req(struct lapd_msg_ctx *lctx, struct msgb *msg); static int send_rslms_dlsap(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx); diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 1e2d323..301f5aa 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -223,6 +223,8 @@ lapdm_phsap_up; lapdm_rslms_recvmsg; +osmo_ph_prim_names; + milenage_auts; milenage_check; milenage_f1;