diff options
Diffstat (limited to 'src/osmo_client_main.c')
-rw-r--r-- | src/osmo_client_main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/osmo_client_main.c b/src/osmo_client_main.c index f00530e..96f01ee 100644 --- a/src/osmo_client_main.c +++ b/src/osmo_client_main.c @@ -21,6 +21,7 @@ */ #include <osmo-pcap/common.h> +#include <osmo-pcap/osmo_pcap_client.h> #include <osmocom/core/application.h> #include <osmocom/core/process.h> @@ -46,6 +47,7 @@ static const char *config_file = "osmo-pcap-client.cfg"; static int daemonize = 0; void *tall_bsc_ctx; +struct osmo_pcap_client *pcap_client; extern void *tall_msgb_ctx; extern void *tall_ctr_ctx; @@ -177,6 +179,14 @@ int main(int argc, char **argv) telnet_init(tall_bsc_ctx, NULL, 4240); + pcap_client = talloc_zero(tall_bsc_ctx, struct osmo_pcap_client); + if (!pcap_client) { + LOGP(DCLIENT, LOGL_ERROR, "Failed to allocate osmo_pcap_client.\n"); + exit(1); + } + pcap_client->fd.fd = -1; + vty_client_init(pcap_client); + if (daemonize) { rc = osmo_daemonize(); if (rc < 0) { |