libctrl: remove openbsc headers, convert from make_sock to libosmocore

This commit is contained in:
Harald Welte 2014-08-20 19:50:04 +02:00
parent e1a502b0df
commit 1238cc64d7
4 changed files with 14 additions and 23 deletions

View File

@ -4,11 +4,10 @@
#include <osmocom/core/msgb.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/write_queue.h>
#include <osmocom/core/logging.h>
#include <osmocom/vty/vector.h>
#include <openbsc/vty.h>
#define CTRL_CMD_ERROR -1
#define CTRL_CMD_HANDLED 0
#define CTRL_CMD_REPLY 1

View File

@ -2,8 +2,10 @@
#define _CONTROL_IF_H
#include <osmocom/core/write_queue.h>
#include <openbsc/control_cmd.h>
#include <openbsc/gsm_data.h>
#include <osmocom/ctrl/control_cmd.h>
/* FIXME: this must go */
struct gsm_network;
typedef int (*ctrl_cmd_handler)(struct ctrl_cmd *, void *);

View File

@ -29,9 +29,7 @@
#include <time.h>
#include <unistd.h>
#include <openbsc/control_cmd.h>
#include <openbsc/debug.h>
#include <openbsc/vty.h>
#include <osmocom/ctrl/control_cmd.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/talloc.h>

View File

@ -38,31 +38,21 @@
#include <sys/socket.h>
#include <sys/types.h>
#include <openbsc/control_cmd.h>
#include <openbsc/control_if.h>
#include <openbsc/debug.h>
#include <openbsc/gsm_data.h>
#include <openbsc/ipaccess.h>
#include <openbsc/socket.h>
#include <osmocom/abis/subchan_demux.h>
#include <openbsc/abis_rsl.h>
#include <openbsc/abis_nm.h>
#include <osmocom/ctrl/control_cmd.h>
#include <osmocom/ctrl/control_if.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/rate_ctr.h>
#include <osmocom/core/select.h>
#include <osmocom/core/statistics.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/socket.h>
#include <osmocom/gsm/tlv.h>
#include <osmocom/gsm/protocol/ipaccess.h>
#include <osmocom/vty/command.h>
#include <osmocom/vty/vector.h>
#include <osmocom/abis/e1_input.h>
#include <osmocom/abis/ipa.h>
vector ctrl_node_vec;
/* Send command to all */
@ -551,8 +541,10 @@ struct ctrl_handle *controlif_setup(struct gsm_network *gsmnet, uint16_t port,
goto err;
/* Listen for control connections */
ret = make_sock(&ctrl->listen_fd, IPPROTO_TCP, INADDR_LOOPBACK, port,
0, listen_fd_cb, ctrl);
ctrl->listen_fd.cb = listen_fd_cb;
ctrl->listen_fd.data = ctrl;
ret = osmo_sock_init_ofd(&ctrl->listen_fd, AF_INET, SOCK_STREAM, IPPROTO_TCP,
"127.0.0.1", port, OSMO_SOCK_F_BIND);
if (ret < 0)
goto err_vec;