From patchwork Fri Jul 21 13:21:37 2017 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: 792124 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.osmocom.org (client-ip=144.76.43.76; helo=lists.osmocom.org; envelope-from=openbsc-bounces@lists.osmocom.org; receiver=) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by ozlabs.org (Postfix) with ESMTP id 3xDWfK3l1Tz9sNw for ; Fri, 21 Jul 2017 23:22:49 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 0D5BC2CCDA; Fri, 21 Jul 2017 13:22:48 +0000 (UTC) Authentication-Results: lists.osmocom.org; dmarc=none header.from=lists.osmocom.org 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 6D7AF2CC54; Fri, 21 Jul 2017 13:21:37 +0000 (UTC) Authentication-Results: lists.osmocom.org; dmarc=none header.from=lists.osmocom.org Authentication-Results: lists.osmocom.org; spf=pass smtp.mailfrom=gerrit-no-reply@lists.osmocom.org Date: Fri, 21 Jul 2017 13:21:37 +0000 From: Harald Welte To: Holger Freyther X-Gerrit-MessageType: newpatchset Subject: [PATCH] osmo-pcap[master]: Use TCP port numbers for VTY that don't overlap with other O... X-Gerrit-Change-Id: I638ac0534517931d0987ce9f72f5db4f5b6c16b7 X-Gerrit-ChangeURL: X-Gerrit-Commit: 2aea8704f391675a704d0431497cf0100ca76b9a In-Reply-To: References: MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/2.12.7-12-gce79992aba X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of OpenBSC, OsmoBSC, OsmoNITB, OsmoCSCN" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: laforge@gnumonks.org Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" Message-Id: <20170721132248.0D5BC2CCDA@lists.osmocom.org> Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3323 to look at the new patch set (#3). Use TCP port numbers for VTY that don't overlap with other Osmocom Software osmo-pcap for historical reasons uses the same port numbers as OsmoPCU and OsmoBTS. This leads to problems when wanting to run related software together on one system. Let's break the historical assumptions and start with non-overlapping port numbers that are allocated/assigned from https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers Change-Id: I638ac0534517931d0987ce9f72f5db4f5b6c16b7 --- M include/osmo-pcap/common.h M osmoappdesc.py M src/osmo_client_main.c M src/osmo_server_main.c 4 files changed, 13 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/23/3323/3 diff --git a/include/osmo-pcap/common.h b/include/osmo-pcap/common.h index 13c76e1..27fd514 100644 --- a/include/osmo-pcap/common.h +++ b/include/osmo-pcap/common.h @@ -28,6 +28,15 @@ #include #include #include +#include + +/* support old versions of libosmocore */ +#ifndef OSMO_VTY_PORT_PCAP_CLIENT +#define OSMO_VTY_PORT_PCAP_CLIENT 4237 +#endif +#ifndef OSMO_VTY_PORT_PCAP_SERVER +#define OSMO_VTY_PORT_PCAP_SERVER 4238 +#endif enum { DPCAP, diff --git a/osmoappdesc.py b/osmoappdesc.py index 39928eb..6f66702 100644 --- a/osmoappdesc.py +++ b/osmoappdesc.py @@ -20,8 +20,8 @@ } apps = [ - (4241, "src/osmo_pcap_server", "OsmoPCAPServer", "osmo-pcap-server"), - (4240, "src/osmo_pcap_client", "OsmoPCAPClient", "osmo-pcap-client"), + (4238, "src/osmo_pcap_server", "OsmoPCAPServer", "osmo-pcap-server"), + (4237, "src/osmo_pcap_client", "OsmoPCAPClient", "osmo-pcap-client"), ] vty_command = ["src/osmo_pcap_server", "-c", "contrib/osmo-pcap-server.cfg"] diff --git a/src/osmo_client_main.c b/src/osmo_client_main.c index 89d7e04..46a49b5 100644 --- a/src/osmo_client_main.c +++ b/src/osmo_client_main.c @@ -206,7 +206,7 @@ osmo_tls_init(); - rc = telnet_init(tall_bsc_ctx, NULL, 4240); + rc = telnet_init(tall_bsc_ctx, NULL, OSMO_VTY_PORT_PCAP_CLIENT); if (rc < 0) { LOGP(DCLIENT, LOGL_ERROR, "Failed to bind telnet interface\n"); exit(1); diff --git a/src/osmo_server_main.c b/src/osmo_server_main.c index 37a9632..95f3ce1 100644 --- a/src/osmo_server_main.c +++ b/src/osmo_server_main.c @@ -219,7 +219,7 @@ osmo_tls_init(); - rc = telnet_init(tall_bsc_ctx, NULL, 4241); + rc = telnet_init(tall_bsc_ctx, NULL, OSMO_VTY_PORT_PCAP_SERVER); if (rc < 0) { LOGP(DCLIENT, LOGL_ERROR, "Failed to bind telnet interface\n"); exit(1);