summaryrefslogtreecommitdiffstats
path: root/src/shared/libosmocore/include/osmocom/gsm/gsm0411_smr.h
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2011-11-13 20:24:49 +0100
committerSylvain Munaut <tnt@246tNt.com>2011-11-13 20:24:49 +0100
commit6d06f6b9db7a8c8a011d957796a3e22cd46457c7 (patch)
tree5094df77de0df433dd39482f7cb1ce0c3105429c /src/shared/libosmocore/include/osmocom/gsm/gsm0411_smr.h
parent4789b4a6627b452041b57f81ea91878de666bcc2 (diff)
parenta71b8eaca7eed4dfc96f2cebabfc26430416c2e9 (diff)
Merge commit 'a71b8eaca7eed4dfc96f2cebabfc26430416c2e9'
Diffstat (limited to 'src/shared/libosmocore/include/osmocom/gsm/gsm0411_smr.h')
-rw-r--r--src/shared/libosmocore/include/osmocom/gsm/gsm0411_smr.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/shared/libosmocore/include/osmocom/gsm/gsm0411_smr.h b/src/shared/libosmocore/include/osmocom/gsm/gsm0411_smr.h
new file mode 100644
index 00000000..5ea8584d
--- /dev/null
+++ b/src/shared/libosmocore/include/osmocom/gsm/gsm0411_smr.h
@@ -0,0 +1,45 @@
+#ifndef _GSM0411_SMR_H
+#define _GSM0411_SMR_H
+
+#include <osmocom/gsm/protocol/gsm_04_11.h>
+
+#define GSM411_SM_RL_DATA_REQ 0x401
+#define GSM411_SM_RL_DATA_IND 0x402
+#define GSM411_SM_RL_MEM_AVAIL_REQ 0x403
+#define GSM411_SM_RL_MEM_AVAIL_IND 0x404
+#define GSM411_SM_RL_REPORT_REQ 0x405
+#define GSM411_SM_RL_REPORT_IND 0x406
+
+struct gsm411_smr_inst {
+ int network; /* is this a MO (0) or MT (1) transfer */
+ int (*rl_recv) (struct gsm411_smr_inst *inst, int msg_type,
+ struct msgb *msg);
+ int (*mn_send) (struct gsm411_smr_inst *inst, int msg_type,
+ struct msgb *msg);
+
+ enum gsm411_rp_state rp_state;
+ struct osmo_timer_list rp_timer;
+};
+
+extern const struct value_string gsm411_rp_cause_strs[];
+
+/* init a new instance */
+void gsm411_smr_init(struct gsm411_smr_inst *inst, int network,
+ int (*rl_recv) (struct gsm411_smr_inst *inst, int msg_type,
+ struct msgb *msg),
+ int (*mn_send) (struct gsm411_smr_inst *inst, int msg_type,
+ struct msgb *msg));
+
+/* clear instance */
+void gsm411_smr_clear(struct gsm411_smr_inst *inst);
+
+/* message from upper layer */
+int gsm411_smr_send(struct gsm411_smr_inst *inst, int msg_type,
+ struct msgb *msg);
+
+/* message from lower layer */
+int gsm411_smr_recv(struct gsm411_smr_inst *inst, int msg_type,
+ struct msgb *msg);
+
+#endif /* _GSM0411_SMR_H */
+