summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
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