Initial support for export + curses-visualization of measurements
This extends osmo_nitb to offer a UDP feed of real-time measurement reports, which can be used by (a variety of) external tools for visualization or other processing. We also add a small ncurses based tool (meas_vis) which shows a baragraph display of the last few mobile stations that were active, indicating their uplink/downlink receive level and quality. <WARNING> This sends non-portable structures like gsm_meas_rep over UDP and assumes the receiver has identical alignment and endianness! Before this feature is merged, it either needs to be converted to a unix domain socket (but they don't do multicast, which would be nice) or the wire format needs to change into something portable with defined alignment and encoding </WARNING>
This commit is contained in:
parent
7ff77ec713
commit
b4771a6871
|
@ -15,7 +15,7 @@ noinst_HEADERS = abis_nm.h abis_rsl.h db.h gsm_04_08.h gsm_data.h \
|
|||
bss.h gsm_data_shared.h ipaccess.h mncc_int.h \
|
||||
arfcn_range_encode.h nat_rewrite_trie.h bsc_nat_callstats.h \
|
||||
osmux.h mgcp_transcode.h rtp.h gprs_utils.h \
|
||||
gprs_gb_parse.h smpp.h
|
||||
gprs_gb_parse.h smpp.h meas_feed.h
|
||||
|
||||
openbsc_HEADERS = gsm_04_08.h meas_rep.h bsc_api.h
|
||||
openbscdir = $(includedir)/openbsc
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef _OPENBSC_MEAS_FEED_H
|
||||
#define _OPENBSC_MEAS_FEED_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <openbsc/meas_rep.h>
|
||||
|
||||
struct meas_feed_hdr {
|
||||
uint8_t msg_type;
|
||||
uint8_t reserved;
|
||||
uint16_t version;
|
||||
};
|
||||
|
||||
struct meas_feed_meas {
|
||||
struct meas_feed_hdr hdr;
|
||||
char imsi[15+1];
|
||||
char name[31+1];
|
||||
char scenario[31+1];
|
||||
struct gsm_meas_rep mr;
|
||||
};
|
||||
|
||||
enum meas_feed_msgtype {
|
||||
MEAS_FEED_MEAS = 0,
|
||||
};
|
||||
|
||||
#define MEAS_FEED_VERSION 0
|
||||
|
||||
|
||||
#endif
|
|
@ -2,6 +2,8 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
|
|||
AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) \
|
||||
$(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS)
|
||||
|
||||
noinst_HEADERS = meas_feed.h
|
||||
|
||||
noinst_LIBRARIES = libmsc.a
|
||||
|
||||
libmsc_a_SOURCES = auth.c \
|
||||
|
@ -17,9 +19,9 @@ libmsc_a_SOURCES = auth.c \
|
|||
ussd.c \
|
||||
vty_interface_layer3.c \
|
||||
transaction.c \
|
||||
osmo_msc.c ctrl_commands.c
|
||||
osmo_msc.c ctrl_commands.c meas_feed.c
|
||||
|
||||
if BUILD_SMPP
|
||||
noinst_HEADERS = smpp_smsc.h
|
||||
noinst_HEADERS += smpp_smsc.h
|
||||
libmsc_a_SOURCES += smpp_smsc.c smpp_openbsc.c smpp_vty.c smpp_utils.c
|
||||
endif
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
/* UDP-Feed of measurement reports */
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <osmocom/core/msgb.h>
|
||||
#include <osmocom/core/socket.h>
|
||||
#include <osmocom/core/write_queue.h>
|
||||
#include <osmocom/core/talloc.h>
|
||||
|
||||
#include <osmocom/vty/command.h>
|
||||
#include <osmocom/vty/vty.h>
|
||||
|
||||
#include <openbsc/meas_rep.h>
|
||||
#include <openbsc/signal.h>
|
||||
#include <openbsc/gsm_subscriber.h>
|
||||
#include <openbsc/meas_feed.h>
|
||||
#include <openbsc/vty.h>
|
||||
|
||||
#include "meas_feed.h"
|
||||
|
||||
struct meas_feed_state {
|
||||
struct osmo_wqueue wqueue;
|
||||
char scenario[31+1];
|
||||
char *dst_host;
|
||||
uint16_t dst_port;
|
||||
};
|
||||
|
||||
|
||||
static struct meas_feed_state g_mfs;
|
||||
|
||||
static int process_meas_rep(struct gsm_meas_rep *mr)
|
||||
{
|
||||
struct msgb *msg;
|
||||
struct meas_feed_meas *mfm;
|
||||
struct gsm_subscriber *subscr;
|
||||
|
||||
/* ignore measurements as long as we don't know who it is */
|
||||
if (!mr->lchan || !mr->lchan->conn || !mr->lchan->conn->subscr)
|
||||
return 0;
|
||||
|
||||
subscr = mr->lchan->conn->subscr;
|
||||
|
||||
msg = msgb_alloc(sizeof(struct meas_feed_meas), "Meas. Feed");
|
||||
if (!msg)
|
||||
return 0;
|
||||
|
||||
/* fill in the header */
|
||||
mfm = (struct meas_feed_meas *) msgb_put(msg, sizeof(*mfm));
|
||||
mfm->hdr.msg_type = MEAS_FEED_MEAS;
|
||||
mfm->hdr.version = MEAS_FEED_VERSION;
|
||||
|
||||
/* fill in MEAS_FEED_MEAS specific header */
|
||||
strncpy(mfm->imsi, subscr->imsi, sizeof(mfm->imsi)-1);
|
||||
mfm->imsi[sizeof(mfm->imsi)-1] = '\0';
|
||||
strncpy(mfm->name, subscr->name, sizeof(mfm->name)-1);
|
||||
mfm->name[sizeof(mfm->name)-1] = '\0';
|
||||
strncpy(mfm->scenario, g_mfs.scenario, sizeof(mfm->scenario));
|
||||
mfm->scenario[sizeof(mfm->scenario)-1] = '\0';
|
||||
|
||||
/* copy the entire measurement report */
|
||||
memcpy(&mfm->mr, mr, sizeof(mfm->mr));
|
||||
|
||||
/* and send it to the socket */
|
||||
osmo_wqueue_enqueue(&g_mfs.wqueue, msg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int meas_feed_sig_cb(unsigned int subsys, unsigned int signal,
|
||||
void *handler_data, void *signal_data)
|
||||
{
|
||||
struct lchan_signal_data *sdata = signal_data;
|
||||
|
||||
if (subsys != SS_LCHAN)
|
||||
return 0;
|
||||
|
||||
if (signal == S_LCHAN_MEAS_REP)
|
||||
process_meas_rep(sdata->mr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int feed_write_cb(struct osmo_fd *ofd, struct msgb *msg)
|
||||
{
|
||||
return write(ofd->fd, msgb_data(msg), msgb_length(msg));
|
||||
}
|
||||
|
||||
static int feed_read_cb(struct osmo_fd *ofd, struct msgb *msg)
|
||||
{
|
||||
int rc;
|
||||
char buf[256];
|
||||
|
||||
rc = read(ofd->fd, buf, sizeof(buf));
|
||||
ofd->fd &= ~BSC_FD_READ;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
int meas_feed_cfg_set(const char *dst_host, uint16_t dst_port)
|
||||
{
|
||||
int rc;
|
||||
int already_initialized = 0;
|
||||
|
||||
if (g_mfs.wqueue.bfd.fd)
|
||||
already_initialized = 1;
|
||||
|
||||
|
||||
if (already_initialized &&
|
||||
!strcmp(dst_host, g_mfs.dst_host) &&
|
||||
dst_port == g_mfs.dst_port)
|
||||
return 0;
|
||||
|
||||
if (!already_initialized) {
|
||||
osmo_wqueue_init(&g_mfs.wqueue, 10);
|
||||
g_mfs.wqueue.write_cb = feed_write_cb;
|
||||
g_mfs.wqueue.read_cb = feed_read_cb;
|
||||
osmo_signal_register_handler(SS_LCHAN, meas_feed_sig_cb, NULL);
|
||||
}
|
||||
|
||||
if (already_initialized) {
|
||||
osmo_wqueue_clear(&g_mfs.wqueue);
|
||||
osmo_fd_unregister(&g_mfs.wqueue.bfd);
|
||||
close(g_mfs.wqueue.bfd.fd);
|
||||
/* don't set to zero, as that would mean 'not yet initialized' */
|
||||
g_mfs.wqueue.bfd.fd = -1;
|
||||
}
|
||||
rc = osmo_sock_init_ofd(&g_mfs.wqueue.bfd, AF_UNSPEC, SOCK_DGRAM,
|
||||
IPPROTO_UDP, dst_host, dst_port,
|
||||
OSMO_SOCK_F_CONNECT);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
g_mfs.wqueue.bfd.when &= ~BSC_FD_READ;
|
||||
|
||||
if (g_mfs.dst_host)
|
||||
talloc_free(g_mfs.dst_host);
|
||||
g_mfs.dst_host = talloc_strdup(NULL, dst_host);
|
||||
g_mfs.dst_port = dst_port;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void meas_feed_cfg_get(char **host, uint16_t *port)
|
||||
{
|
||||
*port = g_mfs.dst_port;
|
||||
*host = g_mfs.dst_host;
|
||||
}
|
||||
|
||||
void meas_feed_scenario_set(const char *name)
|
||||
{
|
||||
strncpy(g_mfs.scenario, name, sizeof(g_mfs.scenario)-1);
|
||||
g_mfs.scenario[sizeof(g_mfs.scenario)-1] = '\0';
|
||||
}
|
||||
|
||||
const char *meas_feed_scenario_get(void)
|
||||
{
|
||||
return g_mfs.scenario;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
#ifndef _INT_MEAS_FEED_H
|
||||
#define _INT_MEAS_FEED_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
int meas_feed_cfg_set(const char *dst_host, uint16_t dst_port);
|
||||
void meas_feed_cfg_get(char **host, uint16_t *port);
|
||||
|
||||
void meas_feed_scenario_set(const char *name);
|
||||
const char *meas_feed_scenario_get(void);
|
||||
|
||||
#endif /* _INT_MEAS_FEED_H */
|
|
@ -49,6 +49,8 @@
|
|||
#include <openbsc/mncc_int.h>
|
||||
#include <openbsc/handover.h>
|
||||
|
||||
#include "meas_feed.h"
|
||||
|
||||
extern struct gsm_network *gsmnet_from_vty(struct vty *v);
|
||||
|
||||
static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr, int pending)
|
||||
|
@ -947,6 +949,11 @@ static const struct value_string tchh_codec_names[] = {
|
|||
|
||||
static int config_write_mncc_int(struct vty *vty)
|
||||
{
|
||||
uint16_t meas_port;
|
||||
char *meas_host;
|
||||
|
||||
meas_feed_cfg_get(&meas_host, &meas_port);
|
||||
|
||||
vty_out(vty, "mncc-int%s", VTY_NEWLINE);
|
||||
vty_out(vty, " default-codec tch-f %s%s",
|
||||
get_value_string(tchf_codec_names, mncc_int.def_codec[0]),
|
||||
|
@ -954,6 +961,10 @@ static int config_write_mncc_int(struct vty *vty)
|
|||
vty_out(vty, " default-codec tch-h %s%s",
|
||||
get_value_string(tchh_codec_names, mncc_int.def_codec[1]),
|
||||
VTY_NEWLINE);
|
||||
if (meas_port)
|
||||
vty_out(vty, " meas-feed destination %s %u%s",
|
||||
meas_host, meas_port, VTY_NEWLINE);
|
||||
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
@ -994,6 +1005,28 @@ DEFUN_DEPRECATED(log_level_sms, log_level_sms_cmd,
|
|||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN(mnccint_meas_feed, mnccint_meas_feed_cmd,
|
||||
"meas-feed destination ADDR <0-65535>",
|
||||
"FIXME")
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = meas_feed_cfg_set(argv[0], atoi(argv[1]));
|
||||
if (rc < 0)
|
||||
return CMD_WARNING;
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN(meas_feed_scenario, meas_feed_scenario_cmd,
|
||||
"meas-feed scenario NAME",
|
||||
"FIXME")
|
||||
{
|
||||
meas_feed_scenario_set(argv[0]);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
int bsc_vty_init_extra(void)
|
||||
{
|
||||
osmo_signal_register_handler(SS_SCALL, scall_cbfn, NULL);
|
||||
|
@ -1028,12 +1061,14 @@ int bsc_vty_init_extra(void)
|
|||
install_element(ENABLE_NODE, &smsqueue_clear_cmd);
|
||||
install_element(ENABLE_NODE, &smsqueue_fail_cmd);
|
||||
install_element(ENABLE_NODE, &subscriber_send_pending_sms_cmd);
|
||||
install_element(ENABLE_NODE, &meas_feed_scenario_cmd);
|
||||
|
||||
install_element(CONFIG_NODE, &cfg_mncc_int_cmd);
|
||||
install_node(&mncc_int_node, config_write_mncc_int);
|
||||
vty_install_default(MNCC_INT_NODE);
|
||||
install_element(MNCC_INT_NODE, &mnccint_def_codec_f_cmd);
|
||||
install_element(MNCC_INT_NODE, &mnccint_def_codec_h_cmd);
|
||||
install_element(MNCC_INT_NODE, &mnccint_meas_feed_cmd);
|
||||
|
||||
install_element(CFG_LOG_NODE, &log_level_sms_cmd);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
|
|||
AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS)
|
||||
AM_LDFLAGS = $(COVERAGE_LDFLAGS)
|
||||
|
||||
bin_PROGRAMS = bs11_config isdnsync
|
||||
bin_PROGRAMS = bs11_config isdnsync meas_vis
|
||||
|
||||
if BUILD_SMPP
|
||||
noinst_PROGRAMS = smpp_mirror
|
||||
|
@ -19,3 +19,7 @@ isdnsync_SOURCES = isdnsync.c
|
|||
smpp_mirror_SOURCES = smpp_mirror.c
|
||||
smpp_mirror_LDADD = $(top_builddir)/src/libcommon/libcommon.a \
|
||||
$(LIBOSMOCORE_LIBS) $(LIBSMPP34_LIBS)
|
||||
|
||||
meas_vis_SOURCES = meas_vis.c
|
||||
meas_vis_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lcdk -lncurses
|
||||
meas_vis_CFLAGS = $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
|
||||
|
|
|
@ -0,0 +1,243 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <cdk/cdk.h>
|
||||
|
||||
#include <osmocom/core/socket.h>
|
||||
#include <osmocom/core/utils.h>
|
||||
#include <osmocom/core/msgb.h>
|
||||
#include <osmocom/core/select.h>
|
||||
#include <osmocom/core/talloc.h>
|
||||
|
||||
#include <osmocom/gsm/gsm_utils.h>
|
||||
|
||||
#include <openbsc/meas_feed.h>
|
||||
|
||||
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 slider {
|
||||
struct ms_state *ms;
|
||||
};
|
||||
|
||||
struct state {
|
||||
struct osmo_fd udp_ofd;
|
||||
struct llist_head ms_list;
|
||||
|
||||
CDKSCREEN *cdkscreen;
|
||||
WINDOW *curses_win;
|
||||
struct slider sliders[8];
|
||||
};
|
||||
|
||||
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);
|
||||
strncpy(ms->imsi, imsi, sizeof(ms->imsi)-1);
|
||||
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);
|
||||
|
||||
strncpy(ms->name, mfm->name, sizeof(ms->imsi)-1);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
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",
|
||||
};
|
||||
|
||||
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 color, pwr;
|
||||
|
||||
if (dir == DIR_UL) {
|
||||
color = A_REVERSE | COLOR_PAIR (29) | ' ';
|
||||
pwr = ms->mr.ms_l1.pwr;
|
||||
} else {
|
||||
color = A_REVERSE | COLOR_PAIR (19) | ' ',
|
||||
pwr = ms->mr.bs_power;
|
||||
}
|
||||
|
||||
snprintf(label, sizeof(label), "%s %s ", ms->imsi, dir_str[dir]);
|
||||
msu->cdk = newCDKSlider(g_st.cdkscreen, 0, row, NULL, label, color,
|
||||
-30, rxlev2dbm(lq->rx_lev), -110, -47,
|
||||
1, 2, FALSE, FALSE);
|
||||
//IsVisibleObj(ms->ul.cdk) = FALSE;
|
||||
snprintf(msu->label, sizeof(msu->label), "%-2d %3u", pwr, 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;
|
||||
|
||||
/* 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 = 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);
|
||||
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int rc;
|
||||
|
||||
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.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);
|
||||
}
|
Loading…
Reference in New Issue