Change in osmo-bts[master]: remove dead oml_router code

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Oct 19 10:50:01 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/20779 )


Change subject: remove dead oml_router code
......................................................................

remove dead oml_router code

We originally wanted to intrdouce an OML router which would permit
external proceses to implement certain OML MOs.  However, that code
was never completed, and all the existing implementation (in three
copies) does is to create a unix domain socket and discard what
is received there.

Change-Id: I7fcbbd5d6b64ddc666ca836dc49abb430be0d5cb
---
M src/osmo-bts-litecell15/Makefile.am
M src/osmo-bts-litecell15/main.c
D src/osmo-bts-litecell15/oml_router.c
D src/osmo-bts-litecell15/oml_router.h
M src/osmo-bts-oc2g/Makefile.am
M src/osmo-bts-oc2g/main.c
D src/osmo-bts-oc2g/oml_router.c
D src/osmo-bts-oc2g/oml_router.h
M src/osmo-bts-sysmo/Makefile.am
M src/osmo-bts-sysmo/main.c
D src/osmo-bts-sysmo/oml_router.c
D src/osmo-bts-sysmo/oml_router.h
12 files changed, 6 insertions(+), 465 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/79/20779/1

diff --git a/src/osmo-bts-litecell15/Makefile.am b/src/osmo-bts-litecell15/Makefile.am
index 0cc124a..bb68efa 100644
--- a/src/osmo-bts-litecell15/Makefile.am
+++ b/src/osmo-bts-litecell15/Makefile.am
@@ -9,12 +9,12 @@
 EXTRA_DIST = misc/lc15bts_mgr.h misc/lc15bts_misc.h misc/lc15bts_par.h misc/lc15bts_led.h \
 	misc/lc15bts_temp.h misc/lc15bts_power.h misc/lc15bts_clock.h \
 	misc/lc15bts_bid.h misc/lc15bts_nl.h misc/lc15bts_bts.h misc/lc15bts_swd.h \
-	hw_misc.h l1_if.h l1_transp.h lc15bts.h oml_router.h utils.h
+	hw_misc.h l1_if.h l1_transp.h lc15bts.h utils.h
 
 bin_PROGRAMS = osmo-bts-lc15 lc15bts-mgr lc15bts-util
 
 COMMON_SOURCES = main.c lc15bts.c l1_if.c oml.c lc15bts_vty.c tch.c hw_misc.c calib_file.c \
-		 utils.c misc/lc15bts_par.c misc/lc15bts_bid.c oml_router.c
+		 utils.c misc/lc15bts_par.c misc/lc15bts_bid.c
 
 osmo_bts_lc15_SOURCES = $(COMMON_SOURCES) l1_transp_hw.c
 osmo_bts_lc15_LDADD = $(top_builddir)/src/common/libbts.a $(COMMON_LDADD)
diff --git a/src/osmo-bts-litecell15/main.c b/src/osmo-bts-litecell15/main.c
index b48d3ec..aecb607 100644
--- a/src/osmo-bts-litecell15/main.c
+++ b/src/osmo-bts-litecell15/main.c
@@ -76,7 +76,6 @@
 #include "utils.h"
 #include "l1_if.h"
 #include "hw_misc.h"
-#include "oml_router.h"
 #include "misc/lc15bts_bid.h"
 
 unsigned int dsp_trace = 0x00000000;
@@ -85,7 +84,6 @@
 {
 	struct stat st;
 	static struct osmo_fd accept_fd, read_fd;
-	int rc;
 
 	struct bts_lc15_priv *bts_lc15 = talloc(bts, struct bts_lc15_priv);
 
@@ -98,13 +96,6 @@
 	/* RTP drift threshold default */
 	bts_lc15->rtp_drift_thres_ms = LC15_BTS_RTP_DRIFT_THRES_DEFAULT;
 
-	rc = oml_router_init(bts, OML_ROUTER_PATH, &accept_fd, &read_fd);
-	if (rc < 0) {
-		fprintf(stderr, "Error creating the OML router: %s rc=%d\n",
-			OML_ROUTER_PATH, rc);
-		exit(1);
-	}
-
 	if (stat(LC15BTS_RF_LOCK_PATH, &st) == 0) {
 		LOGP(DL1C, LOGL_NOTICE, "Not starting BTS due to RF_LOCK file present\n");
 		exit(23);
diff --git a/src/osmo-bts-litecell15/oml_router.c b/src/osmo-bts-litecell15/oml_router.c
deleted file mode 100644
index e20ce5b..0000000
--- a/src/osmo-bts-litecell15/oml_router.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Beginnings of an OML router */
-
-/* Copyright (C) 2015 by Yves Godin <support at nuranwireless.com>
- * 
- * Based on sysmoBTS:
- *     (C) 2014 by 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 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "oml_router.h"
-
-#include <osmo-bts/bts.h>
-#include <osmo-bts/logging.h>
-#include <osmo-bts/oml.h>
-#include <osmo-bts/msg_utils.h>
-
-#include <osmocom/core/socket.h>
-#include <osmocom/core/select.h>
-
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-static int oml_router_read_cb(struct osmo_fd *fd, unsigned int what)
-{
-	struct msgb *msg;
-	int rc;
-
-	msg = oml_msgb_alloc();
-	if (!msg) {
-		LOGP(DL1C, LOGL_ERROR, "Failed to allocate oml msgb.\n");
-		return -1;
-	}
-
-	rc = recv(fd->fd, msg->tail, msg->data_len, 0);
-	if (rc <= 0) {
-		close(fd->fd);
-		osmo_fd_unregister(fd);
-		fd->fd = -1;
-		goto err;
-	}
-
-	msg->l1h = msgb_put(msg, rc);
-	rc = msg_verify_ipa_structure(msg);
-	if (rc < 0) {
-		LOGP(DL1C, LOGL_ERROR,
-			"OML Router: Invalid IPA message rc(%d)\n", rc);
-		goto err;
-	}
-
-	rc = msg_verify_oml_structure(msg);
-	if (rc < 0) {
-		LOGP(DL1C, LOGL_ERROR,
-			"OML Router: Invalid OML message rc(%d)\n", rc);
-		goto err;
-	}
-
-	/* todo dispatch message */
-
-err:
-	msgb_free(msg);
-	return -1;
-}
-
-static int oml_router_accept_cb(struct osmo_fd *accept_fd, unsigned int what)
-{
-	int fd;
-	struct osmo_fd *read_fd = (struct osmo_fd *) accept_fd->data;
-
-	/* Accept only one connection at a time. De-register it */
-	if (read_fd->fd > -1) {
-		LOGP(DL1C, LOGL_NOTICE,
-			"New OML router connection. Closing old one.\n");
-		close(read_fd->fd);
-		osmo_fd_unregister(read_fd);
-		read_fd->fd = -1;
-	}
-
-	fd = accept(accept_fd->fd, NULL, NULL);
-	if (fd < 0) {
-		LOGP(DL1C, LOGL_ERROR, "Failed to accept. errno: %s.\n",
-		     strerror(errno));
-		return -1;
-	}
-
-	read_fd->fd = fd;
-	if (osmo_fd_register(read_fd) != 0) {
-		LOGP(DL1C, LOGL_ERROR, "Registering the read fd failed.\n");
-		close(fd);
-		read_fd->fd = -1;
-		return -1;
-	}
-
-	return 0;
-}
-
-int oml_router_init(struct gsm_bts *bts, const char *path,
-			struct osmo_fd *accept_fd, struct osmo_fd *read_fd)
-{
-	int rc;
-
-	memset(accept_fd, 0, sizeof(*accept_fd));
-	memset(read_fd, 0, sizeof(*read_fd));
-
-	accept_fd->cb = oml_router_accept_cb;
-	accept_fd->data = read_fd;
-
-	read_fd->cb = oml_router_read_cb;
-	read_fd->data = bts;
-	read_fd->when = OSMO_FD_READ;
-	read_fd->fd = -1;
-
-	rc = osmo_sock_unix_init_ofd(accept_fd, SOCK_SEQPACKET, 0,
-					path,
-					OSMO_SOCK_F_BIND | OSMO_SOCK_F_NONBLOCK);
-	return rc;
-}
diff --git a/src/osmo-bts-litecell15/oml_router.h b/src/osmo-bts-litecell15/oml_router.h
deleted file mode 100644
index 8c08baa..0000000
--- a/src/osmo-bts-litecell15/oml_router.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma once
-
-struct gsm_bts;
-struct osmo_fd;
-
-/**
- * The default path lc15bts will listen for incoming
- * registrations for OML routing and sending.
- */
-#define OML_ROUTER_PATH "/var/run/lc15bts_oml_router"
-
-
-int oml_router_init(struct gsm_bts *bts, const char *path, struct osmo_fd *accept, struct osmo_fd *read);
diff --git a/src/osmo-bts-oc2g/Makefile.am b/src/osmo-bts-oc2g/Makefile.am
index 54a8afa..7b18e88 100644
--- a/src/osmo-bts-oc2g/Makefile.am
+++ b/src/osmo-bts-oc2g/Makefile.am
@@ -9,12 +9,12 @@
 EXTRA_DIST = misc/oc2gbts_mgr.h misc/oc2gbts_misc.h misc/oc2gbts_par.h misc/oc2gbts_led.h \
 	misc/oc2gbts_temp.h misc/oc2gbts_power.h misc/oc2gbts_clock.h \
 	misc/oc2gbts_bid.h misc/oc2gbts_bts.h misc/oc2gbts_nl.h misc/oc2gbts_swd.h \
-	hw_misc.h l1_if.h l1_transp.h oc2gbts.h oml_router.h utils.h
+	hw_misc.h l1_if.h l1_transp.h oc2gbts.h utils.h
 
 bin_PROGRAMS = osmo-bts-oc2g oc2gbts-mgr oc2gbts-util
 
 COMMON_SOURCES = main.c oc2gbts.c l1_if.c oml.c oc2gbts_vty.c tch.c hw_misc.c calib_file.c \
-		 utils.c misc/oc2gbts_par.c misc/oc2gbts_bid.c oml_router.c
+		 utils.c misc/oc2gbts_par.c misc/oc2gbts_bid.c
 
 osmo_bts_oc2g_SOURCES = $(COMMON_SOURCES) l1_transp_hw.c
 osmo_bts_oc2g_LDADD = $(top_builddir)/src/common/libbts.a $(COMMON_LDADD)
diff --git a/src/osmo-bts-oc2g/main.c b/src/osmo-bts-oc2g/main.c
index a0f4d4a..678a0b5 100644
--- a/src/osmo-bts-oc2g/main.c
+++ b/src/osmo-bts-oc2g/main.c
@@ -76,7 +76,6 @@
 #include "utils.h"
 #include "l1_if.h"
 #include "hw_misc.h"
-#include "oml_router.h"
 #include "misc/oc2gbts_bid.h"
 
 unsigned int dsp_trace = 0x00000000;
@@ -85,7 +84,6 @@
 {
 	struct stat st;
 	static struct osmo_fd accept_fd, read_fd;
-	int rc;
 
 	struct bts_oc2g_priv *bts_oc2g = talloc(bts, struct bts_oc2g_priv);
 	bts->model_priv = bts_oc2g;
@@ -99,13 +97,6 @@
 	/* RTP drift threshold default */
 	/* bts_oc2g->rtp_drift_thres_ms = OC2G_BTS_RTP_DRIFT_THRES_DEFAULT; */
 
-	rc = oml_router_init(bts, OML_ROUTER_PATH, &accept_fd, &read_fd);
-	if (rc < 0) {
-		fprintf(stderr, "Error creating the OML router: %s rc=%d\n",
-			OML_ROUTER_PATH, rc);
-		exit(1);
-	}
-
 	if (stat(OC2GBTS_RF_LOCK_PATH, &st) == 0) {
 		LOGP(DL1C, LOGL_NOTICE, "Not starting BTS due to RF_LOCK file present\n");
 		exit(23);
diff --git a/src/osmo-bts-oc2g/oml_router.c b/src/osmo-bts-oc2g/oml_router.c
deleted file mode 100644
index e20ce5b..0000000
--- a/src/osmo-bts-oc2g/oml_router.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Beginnings of an OML router */
-
-/* Copyright (C) 2015 by Yves Godin <support at nuranwireless.com>
- * 
- * Based on sysmoBTS:
- *     (C) 2014 by 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 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "oml_router.h"
-
-#include <osmo-bts/bts.h>
-#include <osmo-bts/logging.h>
-#include <osmo-bts/oml.h>
-#include <osmo-bts/msg_utils.h>
-
-#include <osmocom/core/socket.h>
-#include <osmocom/core/select.h>
-
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-static int oml_router_read_cb(struct osmo_fd *fd, unsigned int what)
-{
-	struct msgb *msg;
-	int rc;
-
-	msg = oml_msgb_alloc();
-	if (!msg) {
-		LOGP(DL1C, LOGL_ERROR, "Failed to allocate oml msgb.\n");
-		return -1;
-	}
-
-	rc = recv(fd->fd, msg->tail, msg->data_len, 0);
-	if (rc <= 0) {
-		close(fd->fd);
-		osmo_fd_unregister(fd);
-		fd->fd = -1;
-		goto err;
-	}
-
-	msg->l1h = msgb_put(msg, rc);
-	rc = msg_verify_ipa_structure(msg);
-	if (rc < 0) {
-		LOGP(DL1C, LOGL_ERROR,
-			"OML Router: Invalid IPA message rc(%d)\n", rc);
-		goto err;
-	}
-
-	rc = msg_verify_oml_structure(msg);
-	if (rc < 0) {
-		LOGP(DL1C, LOGL_ERROR,
-			"OML Router: Invalid OML message rc(%d)\n", rc);
-		goto err;
-	}
-
-	/* todo dispatch message */
-
-err:
-	msgb_free(msg);
-	return -1;
-}
-
-static int oml_router_accept_cb(struct osmo_fd *accept_fd, unsigned int what)
-{
-	int fd;
-	struct osmo_fd *read_fd = (struct osmo_fd *) accept_fd->data;
-
-	/* Accept only one connection at a time. De-register it */
-	if (read_fd->fd > -1) {
-		LOGP(DL1C, LOGL_NOTICE,
-			"New OML router connection. Closing old one.\n");
-		close(read_fd->fd);
-		osmo_fd_unregister(read_fd);
-		read_fd->fd = -1;
-	}
-
-	fd = accept(accept_fd->fd, NULL, NULL);
-	if (fd < 0) {
-		LOGP(DL1C, LOGL_ERROR, "Failed to accept. errno: %s.\n",
-		     strerror(errno));
-		return -1;
-	}
-
-	read_fd->fd = fd;
-	if (osmo_fd_register(read_fd) != 0) {
-		LOGP(DL1C, LOGL_ERROR, "Registering the read fd failed.\n");
-		close(fd);
-		read_fd->fd = -1;
-		return -1;
-	}
-
-	return 0;
-}
-
-int oml_router_init(struct gsm_bts *bts, const char *path,
-			struct osmo_fd *accept_fd, struct osmo_fd *read_fd)
-{
-	int rc;
-
-	memset(accept_fd, 0, sizeof(*accept_fd));
-	memset(read_fd, 0, sizeof(*read_fd));
-
-	accept_fd->cb = oml_router_accept_cb;
-	accept_fd->data = read_fd;
-
-	read_fd->cb = oml_router_read_cb;
-	read_fd->data = bts;
-	read_fd->when = OSMO_FD_READ;
-	read_fd->fd = -1;
-
-	rc = osmo_sock_unix_init_ofd(accept_fd, SOCK_SEQPACKET, 0,
-					path,
-					OSMO_SOCK_F_BIND | OSMO_SOCK_F_NONBLOCK);
-	return rc;
-}
diff --git a/src/osmo-bts-oc2g/oml_router.h b/src/osmo-bts-oc2g/oml_router.h
deleted file mode 100644
index 4b22e9c..0000000
--- a/src/osmo-bts-oc2g/oml_router.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma once
-
-struct gsm_bts;
-struct osmo_fd;
-
-/**
- * The default path oc2gbts will listen for incoming
- * registrations for OML routing and sending.
- */
-#define OML_ROUTER_PATH "/var/run/oc2gbts_oml_router"
-
-
-int oml_router_init(struct gsm_bts *bts, const char *path, struct osmo_fd *accept, struct osmo_fd *read);
diff --git a/src/osmo-bts-sysmo/Makefile.am b/src/osmo-bts-sysmo/Makefile.am
index 5f588f8..1faf122 100644
--- a/src/osmo-bts-sysmo/Makefile.am
+++ b/src/osmo-bts-sysmo/Makefile.am
@@ -5,12 +5,12 @@
 EXTRA_DIST = misc/sysmobts_mgr.h misc/sysmobts_misc.h misc/sysmobts_par.h \
 	misc/sysmobts_eeprom.h misc/sysmobts_nl.h femtobts.h hw_misc.h \
 	misc/sysmobts-layer1.h \
-	l1_fwd.h l1_if.h l1_transp.h eeprom.h utils.h oml_router.h
+	l1_fwd.h l1_if.h l1_transp.h eeprom.h utils.h
 
 bin_PROGRAMS = osmo-bts-sysmo osmo-bts-sysmo-remote l1fwd-proxy sysmobts-mgr sysmobts-util
 
 COMMON_SOURCES = main.c femtobts.c l1_if.c oml.c sysmobts_vty.c tch.c hw_misc.c calib_file.c \
-		 eeprom.c calib_fixup.c utils.c misc/sysmobts_par.c oml_router.c sysmobts_ctrl.c
+		 eeprom.c calib_fixup.c utils.c misc/sysmobts_par.c sysmobts_ctrl.c
 
 osmo_bts_sysmo_SOURCES = $(COMMON_SOURCES) l1_transp_hw.c
 osmo_bts_sysmo_LDADD = $(top_builddir)/src/common/libbts.a $(COMMON_LDADD)
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c
index 51a14c7..64302a1 100644
--- a/src/osmo-bts-sysmo/main.c
+++ b/src/osmo-bts-sysmo/main.c
@@ -53,24 +53,15 @@
 #include "eeprom.h"
 #include "l1_if.h"
 #include "hw_misc.h"
-#include "oml_router.h"
 
 int bts_model_init(struct gsm_bts *bts)
 {
 	struct stat st;
 	static struct osmo_fd accept_fd, read_fd;
-	int rc;
 
 	bts->variant = BTS_OSMO_SYSMO;
 	bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3);
 
-	rc = oml_router_init(bts, OML_ROUTER_PATH, &accept_fd, &read_fd);
-	if (rc < 0) {
-		fprintf(stderr, "Error creating the OML router: %s rc=%d\n",
-			OML_ROUTER_PATH, rc);
-		exit(1);
-	}
-
 	if (stat(SYSMOBTS_RF_LOCK_PATH, &st) == 0) {
 		LOGP(DL1C, LOGL_NOTICE, "Not starting BTS due to RF_LOCK file present\n");
 		exit(23);
diff --git a/src/osmo-bts-sysmo/oml_router.c b/src/osmo-bts-sysmo/oml_router.c
deleted file mode 100644
index faaf1b5..0000000
--- a/src/osmo-bts-sysmo/oml_router.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Beginnings of an OML router */
-
-/* (C) 2014 by 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 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "oml_router.h"
-
-#include <osmo-bts/bts.h>
-#include <osmo-bts/logging.h>
-#include <osmo-bts/oml.h>
-#include <osmo-bts/msg_utils.h>
-
-#include <osmocom/core/socket.h>
-#include <osmocom/core/select.h>
-
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-static int oml_router_read_cb(struct osmo_fd *fd, unsigned int what)
-{
-	struct msgb *msg;
-	int rc;
-
-	msg = oml_msgb_alloc();
-	if (!msg) {
-		LOGP(DL1C, LOGL_ERROR, "Failed to allocate oml msgb.\n");
-		return -1;
-	}
-
-	rc = recv(fd->fd, msg->tail, msg->data_len, 0);
-	if (rc <= 0) {
-		close(fd->fd);
-		osmo_fd_unregister(fd);
-		fd->fd = -1;
-		goto err;
-	}
-
-	msg->l1h = msgb_put(msg, rc);
-	rc = msg_verify_ipa_structure(msg);
-	if (rc < 0) {
-		LOGP(DL1C, LOGL_ERROR,
-			"OML Router: Invalid IPA message rc(%d)\n", rc);
-		goto err;
-	}
-
-	rc = msg_verify_oml_structure(msg);
-	if (rc < 0) {
-		LOGP(DL1C, LOGL_ERROR,
-			"OML Router: Invalid OML message rc(%d)\n", rc);
-		goto err;
-	}
-
-	/* todo dispatch message */
-
-err:
-	msgb_free(msg);
-	return -1;
-}
-
-static int oml_router_accept_cb(struct osmo_fd *accept_fd, unsigned int what)
-{
-	int fd;
-	struct osmo_fd *read_fd = (struct osmo_fd *) accept_fd->data;
-
-	/* Accept only one connection at a time. De-register it */
-	if (read_fd->fd > -1) {
-		LOGP(DL1C, LOGL_NOTICE,
-			"New OML router connection. Closing old one.\n");
-		close(read_fd->fd);
-		osmo_fd_unregister(read_fd);
-		read_fd->fd = -1;
-	}
-
-	fd = accept(accept_fd->fd, NULL, NULL);
-	if (fd < 0) {
-		LOGP(DL1C, LOGL_ERROR, "Failed to accept. errno: %s.\n",
-		     strerror(errno));
-		return -1;
-	}
-
-	read_fd->fd = fd;
-	if (osmo_fd_register(read_fd) != 0) {
-		LOGP(DL1C, LOGL_ERROR, "Registering the read fd failed.\n");
-		close(fd);
-		read_fd->fd = -1;
-		return -1;
-	}
-
-	return 0;
-}
-
-int oml_router_init(struct gsm_bts *bts, const char *path,
-			struct osmo_fd *accept_fd, struct osmo_fd *read_fd)
-{
-	int rc;
-
-	memset(accept_fd, 0, sizeof(*accept_fd));
-	memset(read_fd, 0, sizeof(*read_fd));
-
-	accept_fd->cb = oml_router_accept_cb;
-	accept_fd->data = read_fd;
-
-	read_fd->cb = oml_router_read_cb;
-	read_fd->data = bts;
-	read_fd->when = OSMO_FD_READ;
-	read_fd->fd = -1;
-
-	rc = osmo_sock_unix_init_ofd(accept_fd, SOCK_SEQPACKET, 0,
-					path,
-					OSMO_SOCK_F_BIND | OSMO_SOCK_F_NONBLOCK);
-	return rc;
-}
diff --git a/src/osmo-bts-sysmo/oml_router.h b/src/osmo-bts-sysmo/oml_router.h
deleted file mode 100644
index 55f0681..0000000
--- a/src/osmo-bts-sysmo/oml_router.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma once
-
-struct gsm_bts;
-struct osmo_fd;
-
-/**
- * The default path sysmobts will listen for incoming
- * registrations for OML routing and sending.
- */
-#define OML_ROUTER_PATH "/var/run/sysmobts_oml_router"
-
-
-int oml_router_init(struct gsm_bts *bts, const char *path, struct osmo_fd *accept, struct osmo_fd *read);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/20779
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I7fcbbd5d6b64ddc666ca836dc49abb430be0d5cb
Gerrit-Change-Number: 20779
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201019/9e628c62/attachment.htm>


More information about the gerrit-log mailing list