path: root/include/osmocom/gsm/gsm0808_utils.h
diff options
authorPhilipp Maier <pmaier@sysmocom.de>2017-03-24 18:03:17 +0100
committerHarald Welte <laforge@gnumonks.org>2017-04-08 07:44:45 +0000
commit6f725d6da3b488558e78d4ba8dacfecde196f07f (patch)
tree836a3fdaf1472515de807a7116a40091c3d3a23b /include/osmocom/gsm/gsm0808_utils.h
parent22401433aad9f19074229f00d4f3b091de4804ce (diff)
gsm0808: Add utils for Speech Codec List and Speech Codec
The planned support for true A over IP requires the encoding and decoding of a so called "Speech Codec Element" element. This commt adds parsing functionality and tests for the element mentioned above, however, it is not yet actively used. Change-Id: I0e1e2edf47adaa45b22d4b0bcae3640dba7ca200
Diffstat (limited to 'include/osmocom/gsm/gsm0808_utils.h')
1 files changed, 19 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h
index 5fc1c880..b5ddbdb7 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -21,6 +21,8 @@
#include <sys/socket.h>
+#include <osmocom/gsm/protocol/gsm_08_08.h>
/* Encode AoIP transport address element */
uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg,
const struct sockaddr_storage *ss);
@@ -28,3 +30,20 @@ uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg,
/* Decode AoIP transport address element */
int gsm0808_dec_aoip_trasp_addr(struct sockaddr_storage *ss,
const uint8_t *elem, uint8_t len);
+/* Encode Speech Codec element */
+uint8_t gsm0808_enc_speech_codec(struct msgb *msg,
+ const struct gsm0808_speech_codec *sc);
+/* Decode Speech Codec element */
+int gsm0808_dec_speech_codec(struct gsm0808_speech_codec *sc,
+ const uint8_t *elem, uint8_t len);
+/* Encode Speech Codec list */
+uint8_t gsm0808_enc_speech_codec_list(struct msgb *msg,
+ const struct gsm0808_speech_codec_list
+ *scl);
+/* Decode Speech Codec list */
+int gsm0808_dec_speech_codec_list(struct gsm0808_speech_codec_list *scl,
+ const uint8_t *elem, uint8_t len);