From 14e76b9958b6cb93944a991ffaa5125f601f3d20 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Tue, 28 Mar 2017 18:36:52 +0200 Subject: gsm0808: Add utils for Encryption Information The planned support for true A over IP requires the encoding of the an Encryption Information element (see also BSS_MAP_MSG_CIPHER_MODE_CMD). This commt adds encoding/decoding functionality and tests for the element mentioned above, however, it is not yet actively used. Change-Id: I8262050a9d9fd3f17462cfbb046c6e034dccc6fb --- include/osmocom/gsm/gsm0808_utils.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/osmocom/gsm/gsm0808_utils.h') diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index 48e737d1..5bd27c76 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -55,3 +55,11 @@ uint8_t gsm0808_enc_channel_type(struct msgb *msg, /* Decode Channel Type element */ int gsm0808_dec_channel_type(struct gsm0808_channel_type *ct, const uint8_t *elem, uint8_t len); + +/* Encode Encryption Information element */ +uint8_t gsm0808_enc_encrypt_info(struct msgb *msg, + const struct gsm0808_encrypt_info *ei); + +/* Decode Encryption Information element */ +int gsm0808_dec_encrypt_info(struct gsm0808_encrypt_info *ei, + const uint8_t *elem, uint8_t len); -- cgit v1.2.3