From 130c4fbe2e815d94bcf4b6d13849bebbfbf0198d Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 23 Jun 2011 21:15:53 +0200 Subject: ipa-proxy: add A-bis over IP generic proxy commands for VTY This patch adds VTY commands to route IPA flows. The following example allows to add a new route: $ tests/./ipa_proxy_test & <0000> ipa_proxy_test.c:74 entering main loop $ telnet localhost 4260 ipa-proxy-test> enable ipa-proxy-test# ipa instance input-oml bind 127.0.0.1 tcp port 8888 ipa-proxy-test# ipa instance output-oml connect 127.0.0.1 tcp port 3002 ipa-proxy-test# ipa route instance input-oml streamid 0xfe instance output-oml streamid 0xfe ipa-proxy-test# ipa instance input-rsl bind 127.0.0.1 tcp port 8889 ipa-proxy-test# ipa instance output-rsl connect 127.0.0.1 tcp port 3003 ipa-proxy-test# ipa route instance input-rsl streamid 0xfe instance output-rsl streamid 0xfe I'm using this to initially test this code [*]. [*] note that this requires a minor hackish patch for the src/input/ipaccess.c driver which changes the default OML and RSL ports to listen in 8888 and 8889 instead of the default ports, thus, I can initially test everything from the localhost. --- include/internal.h | 3 +++ include/osmocom/abis/Makefile.am | 7 ++++++- include/osmocom/abis/ipa_proxy.h | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 include/osmocom/abis/ipa_proxy.h (limited to 'include') diff --git a/include/internal.h b/include/internal.h index 9d16722..f19f006 100644 --- a/include/internal.h +++ b/include/internal.h @@ -1,6 +1,9 @@ #ifndef _INTERNAL_H_ #define _INTERNAL_H_ +/* XXX: fix this in libosmocore, we need some reserved range */ +#define IPA_NODE _LAST_OSMOVTY_NODE + 100 + /* talloc context for libosmo-abis. */ extern void *libosmo_abis_ctx; diff --git a/include/osmocom/abis/Makefile.am b/include/osmocom/abis/Makefile.am index 3093ee5..6cf3510 100644 --- a/include/osmocom/abis/Makefile.am +++ b/include/osmocom/abis/Makefile.am @@ -1,3 +1,8 @@ -osmoabis_HEADERS = abis.h e1_input.h subchan_demux.h ipaccess.h trau_frame.h +osmoabis_HEADERS = abis.h \ + e1_input.h \ + subchan_demux.h \ + ipa_proxy.h \ + ipaccess.h \ + trau_frame.h osmoabisdir = $(includedir)/osmocom/gsm/abis diff --git a/include/osmocom/abis/ipa_proxy.h b/include/osmocom/abis/ipa_proxy.h new file mode 100644 index 0000000..9b4efa9 --- /dev/null +++ b/include/osmocom/abis/ipa_proxy.h @@ -0,0 +1,6 @@ +#ifndef _IPA_PROXY_H_ +#define _IPA_PROXY_H_ + +void ipa_proxy_vty_init(void); + +#endif -- cgit v1.2.3-55-g7522