From f4b2c4ca42cc530c38c9ac6f275e4d7da9315fa2 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 16 Sep 2018 07:53:41 +0200 Subject: Remove local libgsupclient; Use libosmo-gsup-client from osmo-hlr osmo-hlr has recently (as of Change-Id Iad227bb477d64da30dd6bfbbe1bd0c0a55be9474) a working shared library implementation of libosmo-gsup-client. We can remove the local implementation in osmo-sgsn and use the system-installed shared library instead. Change-Id: I6f542945403cf2e3ddac419186b09ec0e2d43b69 --- include/osmocom/sgsn/Makefile.am | 1 - include/osmocom/sgsn/gsup_client.h | 63 -------------------------------------- include/osmocom/sgsn/sgsn.h | 4 +-- 3 files changed, 2 insertions(+), 66 deletions(-) delete mode 100644 include/osmocom/sgsn/gsup_client.h (limited to 'include') diff --git a/include/osmocom/sgsn/Makefile.am b/include/osmocom/sgsn/Makefile.am index 3b563c401..cbf7c51b6 100644 --- a/include/osmocom/sgsn/Makefile.am +++ b/include/osmocom/sgsn/Makefile.am @@ -16,7 +16,6 @@ noinst_HEADERS = \ gprs_sndcp_xid.h \ gprs_subscriber.h \ gprs_utils.h \ - gsup_client.h \ gtphub.h \ sgsn.h \ signal.h \ diff --git a/include/osmocom/sgsn/gsup_client.h b/include/osmocom/sgsn/gsup_client.h deleted file mode 100644 index 6ba0d1581..000000000 --- a/include/osmocom/sgsn/gsup_client.h +++ /dev/null @@ -1,63 +0,0 @@ -/* GPRS Subscriber Update Protocol client */ - -/* (C) 2014 by Sysmocom s.f.m.c. GmbH - * All Rights Reserved - * - * Author: Jacob Erlbeck - * - * 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 Affero 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 . - * - */ -#pragma once - -#include - -#include - -#define GSUP_CLIENT_RECONNECT_INTERVAL 10 -#define GSUP_CLIENT_PING_INTERVAL 20 - -struct msgb; -struct ipa_client_conn; -struct gsup_client; - -/* Expects message in msg->l2h */ -typedef int (*gsup_client_read_cb_t)(struct gsup_client *gsupc, - struct msgb *msg); - -struct gsup_client { - const char *unit_name; - - struct ipa_client_conn *link; - gsup_client_read_cb_t read_cb; - void *data; - - struct osmo_oap_client_state oap_state; - - struct osmo_timer_list ping_timer; - struct osmo_timer_list connect_timer; - int is_connected; - int got_ipa_pong; -}; - -struct gsup_client *gsup_client_create(const char *unit_name, - const char *ip_addr, - unsigned int tcp_port, - gsup_client_read_cb_t read_cb, - struct osmo_oap_client_config *oapc_config); - -void gsup_client_destroy(struct gsup_client *gsupc); -int gsup_client_send(struct gsup_client *gsupc, struct msgb *msg); -struct msgb *gsup_client_msgb_alloc(void); - diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h index 59d0bd72e..3a34ff928 100644 --- a/include/osmocom/sgsn/sgsn.h +++ b/include/osmocom/sgsn/sgsn.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "../../bscconfig.h" @@ -18,7 +19,6 @@ #include #include -struct gprs_gsup_client; struct hostent; enum sgsn_auth_policy { @@ -138,7 +138,7 @@ struct sgsn_instance { /* GSN instance for libgtp */ struct gsn_t *gsn; /* Subscriber */ - struct gsup_client *gsup_client; + struct osmo_gsup_client *gsup_client; /* LLME inactivity timer */ struct osmo_timer_list llme_timer; -- cgit v1.2.3