summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPablo Neira Ayuso2011-06-09 15:06:11 +0200
committerPablo Neira Ayuso2011-06-14 18:47:09 +0200
commit96e81280617112d5f683b5c78c010fd4843e2af0 (patch)
tree090f956d2bbfdea91da1ecd5d04e4e2eb02fb47b /include
parentsrc: add support for logging infrastructure in libosmo-abis (diff)
downloadlibosmo-abis-96e81280617112d5f683b5c78c010fd4843e2af0.tar.gz
libosmo-abis-96e81280617112d5f683b5c78c010fd4843e2af0.tar.xz
libosmo-abis-96e81280617112d5f683b5c78c010fd4843e2af0.zip
input: ipaccess: add preliminary BTS-side for A-bis over IP
This patch adds the BTS-side for the ip.access driver for A-bis over IP communications. This patch adds one example under test/ so you can test the existing BSC and BTS sides over ip.access. Still incomplete, it requires to allow to register some callback in the BTS side to perform some action once we receive some message. This will come in next updates.
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/abis/ipa.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/osmocom/abis/ipa.h b/include/osmocom/abis/ipa.h
new file mode 100644
index 0000000..de1d70f
--- /dev/null
+++ b/include/osmocom/abis/ipa.h
@@ -0,0 +1,32 @@
+#ifndef _OSMO_IPA_H_
+#define _OSMO_IPA_H_
+
+#include <osmocom/core/linuxlist.h>
+#include <osmocom/core/timer.h>
+
+enum ipa_link_state {
+ IPA_LINK_STATE_NONE = 0,
+ IPA_LINK_STATE_CONNECTING = 1,
+ IPA_LINK_STATE_CONNECTED = 2,
+ IPA_LINK_STATE_MAX
+};
+
+struct ipa_link {
+ struct e1inp_line *line;
+ struct osmo_fd ofd;
+ struct llist_head tx_queue;
+ struct osmo_timer_list timer;
+ enum ipa_link_state state;
+ struct sockaddr_in addr;
+ int (*process)(struct ipa_link *link, struct msgb *msg);
+};
+
+struct ipa_link *ipa_client_link_create(void *ctx);
+void ipa_client_link_destroy(struct ipa_link *link);
+
+int ipa_client_link_open(struct ipa_link *link);
+void ipa_client_link_close(struct ipa_link *link);
+
+int ipa_msg_recv(int fd, struct msgb **rmsg);
+
+#endif