summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/include/osmocom/bb/mobile/transaction.h
diff options
context:
space:
mode:
authorSylvain Munaut2010-07-27 20:44:46 +0200
committerSylvain Munaut2010-07-27 20:49:27 +0200
commit9e9f99c0a094a3b82a75bbac33cabc2be8a6bacb (patch)
tree24f420eb61d8204c93ae1f369221626e2c27a948 /src/host/layer23/include/osmocom/bb/mobile/transaction.h
parentlayer23: Split [1/2] -> The source code (diff)
downloadosmocom-9e9f99c0a094a3b82a75bbac33cabc2be8a6bacb.tar.gz
osmocom-9e9f99c0a094a3b82a75bbac33cabc2be8a6bacb.tar.xz
osmocom-9e9f99c0a094a3b82a75bbac33cabc2be8a6bacb.zip
layer23: Split [2/2] -> The header files
This split the headers and adapt the source. We use osmocom/bb as a prefix because libosomore also uses osmocom and generic names such as misc & common could conflict in the future. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src/host/layer23/include/osmocom/bb/mobile/transaction.h')
-rw-r--r--src/host/layer23/include/osmocom/bb/mobile/transaction.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/host/layer23/include/osmocom/bb/mobile/transaction.h b/src/host/layer23/include/osmocom/bb/mobile/transaction.h
new file mode 100644
index 0000000..4be82c1
--- /dev/null
+++ b/src/host/layer23/include/osmocom/bb/mobile/transaction.h
@@ -0,0 +1,71 @@
+#ifndef _TRANSACT_H
+#define _TRANSACT_H
+
+#include <osmocore/linuxlist.h>
+
+/* One transaction */
+struct gsm_trans {
+ /* Entry in list of all transactions */
+ struct llist_head entry;
+
+ /* The protocol within which we live */
+ uint8_t protocol;
+
+ /* The current transaction ID */
+ uint8_t transaction_id;
+
+ /* To whom we belong */
+ struct osmocom_ms *ms;
+
+ /* reference from MNCC or other application */
+ uint32_t callref;
+
+ /* if traffic channel receive was requested */
+ int tch_recv;
+
+ union {
+ struct {
+
+ /* current call state */
+ int state;
+
+ /* most recent progress indicator */
+ uint8_t prog_ind;
+
+ /* current timer and message queue */
+ int Tcurrent; /* current CC timer */
+ int T308_second; /* used to send release again */
+ struct timer_list timer;
+ struct gsm_mncc msg; /* stores setup/disconnect/release message */
+ } cc;
+#if 0
+ struct {
+ uint8_t link_id; /* RSL Link ID to be used for this trans */
+ int is_mt; /* is this a MO (0) or MT (1) transfer */
+ enum gsm411_cp_state cp_state;
+ struct timer_list cp_timer;
+
+ enum gsm411_rp_state rp_state;
+
+ struct gsm_sms *sms;
+ } sms;
+#endif
+ };
+};
+
+
+
+struct gsm_trans *trans_find_by_id(struct osmocom_ms *ms,
+ uint8_t proto, uint8_t trans_id);
+struct gsm_trans *trans_find_by_callref(struct osmocom_ms *ms,
+ uint32_t callref);
+
+struct gsm_trans *trans_alloc(struct osmocom_ms *ms,
+ uint8_t protocol, uint8_t trans_id,
+ uint32_t callref);
+void trans_free(struct gsm_trans *trans);
+
+int trans_assign_trans_id(struct osmocom_ms *ms,
+ uint8_t protocol, uint8_t ti_flag);
+
+#endif