pespin submitted this change.
input: Get rid of abis/ipa.h dependency in e1_input and ipaccess.c
abis/ipa.h will eventually be deprecated. The only current use of
abis/ipa.h in libosmo-abis itself is in helper code such as:
* tests/ipa_recv/ipa_recv_test.c
* src/ipa_proxy.c
ipaccess e1_input driver is also using struct ipa_keepalive_params,
which is only exported publicly in e1_input.h as a pointer and is only
really used internally, hence move a copy of the struct to internal.h
and use it internally (e1_input_vty.c) from there.
Leave a copy of the struct in its original abis/ipa.h (which as
mentioned contains code to be deprecated) for old users.
Change-Id: I4efb11ae44c28c4f56f71f5797966f6106493f2b
---
M include/internal.h
M include/osmocom/abis/e1_input.h
M src/e1_input_vty.c
M src/input/ipa.c
M src/input/ipaccess.c
M src/ipa_proxy.c
6 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/include/internal.h b/include/internal.h
index 0ee2dcb..ed2dec4 100644
--- a/include/internal.h
+++ b/include/internal.h
@@ -10,6 +10,14 @@
struct e1inp_sign_link;
struct e1inp_ts;
+/*! parameters describing the keep-alive FSM (timeouts). */
+struct ipa_keepalive_params {
+ /*! interval (seconds) in which to send IPA CCM PING requests to the peer. */
+ unsigned int interval;
+ /*! time (seconds) to wait for an IPA CCM PONG in response to a IPA CCM PING before giving up. */
+ unsigned int wait_for_resp;
+};
+
struct ipa_proto_pars {
uint8_t dscp;
uint8_t priority;
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index c3f7da9..66985ea 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -40,6 +40,7 @@
E1I_CTR_REMOVED,
};
+struct ipa_keepalive_params;
struct e1inp_ts;
struct vty;
diff --git a/src/e1_input_vty.c b/src/e1_input_vty.c
index b1898dd..de92359 100644
--- a/src/e1_input_vty.c
+++ b/src/e1_input_vty.c
@@ -41,7 +41,6 @@
#include <osmocom/vty/telnet_interface.h>
#include <osmocom/abis/e1_input.h>
-#include <osmocom/abis/ipa.h>
#define X(x) (1 << x)
diff --git a/src/input/ipa.c b/src/input/ipa.c
index 073c1ff..0d4f32e 100644
--- a/src/input/ipa.c
+++ b/src/input/ipa.c
@@ -1,5 +1,3 @@
-#include "internal.h"
-
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 8960647..a8e4cc4 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -54,7 +54,6 @@
#include <osmocom/netif/stream.h>
#include <osmocom/netif/ipa.h>
#include <osmocom/abis/e1_input.h>
-#include <osmocom/abis/ipa.h>
/* global parameters of IPA input driver */
struct ipa_pars g_e1inp_ipaccess_pars;
diff --git a/src/ipa_proxy.c b/src/ipa_proxy.c
index 04d3f9c..6a211ee 100644
--- a/src/ipa_proxy.c
+++ b/src/ipa_proxy.c
@@ -1,5 +1,3 @@
-#include "internal.h"
-
#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
@@ -27,6 +25,8 @@
static void *tall_ipa_proxy_ctx;
+extern void *libosmo_abis_ctx;
+
/*
* data structures used by the IPA VTY commands
*/
To view, visit change 39043. To unsubscribe, or for help writing mail filters, visit settings.