aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-12-01 21:08:19 +0100
committerHarald Welte <laforge@gnumonks.org>2011-12-01 21:09:19 +0100
commitad633b09192dd8edc2952f992abfc96d4fe04940 (patch)
tree39430e2eae4f63e753f6a600226cc58c324b0b07 /include/osmocom
parent62cb45763206e3b5c4d0ae4093cf4d8cc16a1c94 (diff)
SMS: export gsm411_bcdify() and gsm411_unbcdify() functions
The same functions are e.g. required by the NITZ code in 04.08, and we don't want copy+paste.
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/gsm/gsm0411_utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsm0411_utils.h b/include/osmocom/gsm/gsm0411_utils.h
index a030f581..d29ca631 100644
--- a/include/osmocom/gsm/gsm0411_utils.h
+++ b/include/osmocom/gsm/gsm0411_utils.h
@@ -1,6 +1,12 @@
#ifndef _GSM0411_UTILS_H
#define _GSM0411_UTILS_H
+/* Turn int into semi-octet representation: 98 => 0x89 */
+uint8_t gsm411_bcdify(uint8_t value);
+
+/* Turn semi-octet representation into int: 0x89 => 98 */
+uint8_t gsm411_unbcdify(uint8_t value);
+
struct msgb *gsm411_msgb_alloc(void);
/* Generate 03.40 TP-SCTS */