summaryrefslogtreecommitdiffstats
path: root/src/shared/libosmocore/include/osmocom/gsm/gsm0411_utils.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_utils.h
parent4789b4a6627b452041b57f81ea91878de666bcc2 (diff)
parenta71b8eaca7eed4dfc96f2cebabfc26430416c2e9 (diff)
Merge commit 'a71b8eaca7eed4dfc96f2cebabfc26430416c2e9'
Diffstat (limited to 'src/shared/libosmocore/include/osmocom/gsm/gsm0411_utils.h')
-rw-r--r--src/shared/libosmocore/include/osmocom/gsm/gsm0411_utils.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/shared/libosmocore/include/osmocom/gsm/gsm0411_utils.h b/src/shared/libosmocore/include/osmocom/gsm/gsm0411_utils.h
new file mode 100644
index 00000000..a030f581
--- /dev/null
+++ b/src/shared/libosmocore/include/osmocom/gsm/gsm0411_utils.h
@@ -0,0 +1,30 @@
+#ifndef _GSM0411_UTILS_H
+#define _GSM0411_UTILS_H
+
+struct msgb *gsm411_msgb_alloc(void);
+
+/* Generate 03.40 TP-SCTS */
+void gsm340_gen_scts(uint8_t *scts, time_t time);
+
+/* Decode 03.40 TP-SCTS (into utc/gmt timestamp) */
+time_t gsm340_scts(uint8_t *scts);
+
+/* decode validity period. return minutes */
+unsigned long gsm340_validity_period(uint8_t sms_vpf, uint8_t *sms_vp);
+
+/* determine coding alphabet dependent on GSM 03.38 Section 4 DCS */
+enum sms_alphabet gsm338_get_sms_alphabet(uint8_t dcs);
+
+/* generate a TPDU address field compliant with 03.40 sec. 9.1.2.5 */
+int gsm340_gen_oa(uint8_t *oa, unsigned int oa_len, uint8_t type,
+ uint8_t plan, const char *number);
+
+/* Prefix msg with a RP header */
+int gsm411_push_rp_header(struct msgb *msg, uint8_t rp_msg_type,
+ uint8_t rp_msg_ref);
+
+/* Prefix msg with a 04.08/04.11 CP header */
+int gsm411_push_cp_header(struct msgb *msg, uint8_t proto, uint8_t trans,
+ uint8_t msg_type);
+
+#endif /* _GSM0411_UTILS_H */