summaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-08-08 12:38:52 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-08-08 14:25:09 +0200
commit6bfa7445fca074fdf94707681d93e92ec0993bbd (patch)
tree308ad534d0593808982294563d7f3eb6c13bf938 /include/osmocom
parent94b2f64ae735b85e7b7c42a76b5456dd09e00b2b (diff)
encoding: Provide an overload for the gsm_7bit_encode and a simple test
This is required for encoding the SMS header using the alpha numeric rules. Reviewed-by: Jacob Erlbeck <jerlbeck@sysmocom.de>
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/gsm/gsm_utils.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h
index cf63ea43..a572f504 100644
--- a/include/osmocom/gsm/gsm_utils.h
+++ b/include/osmocom/gsm/gsm_utils.h
@@ -59,6 +59,7 @@ enum gsm_band gsm_band_parse(const char *mhz);
int gsm_7bit_decode(char *decoded, const uint8_t *user_data, uint8_t length);
int gsm_7bit_decode_hdr(char *decoded, const uint8_t *user_data, uint8_t length, uint8_t ud_hdr_ind);
int gsm_7bit_encode(uint8_t *result, const char *data);
+int gsm_7bit_encode_oct(uint8_t *result, const char *data, int *octets_written);
/* the three functions below are helper functions and here for the unit test */
int gsm_septets2octets(uint8_t *result, const uint8_t *rdata, uint8_t septet_len, uint8_t padding);