libosmogsm  0.9.6.20171026
Osmocom GSM library
gsm0808_utils.h
Go to the documentation of this file.
1 
4 /*
5  * (C) 2016 by Sysmocom s.f.m.c. GmbH
6  * All Rights Reserved
7  *
8  * Author: Philipp Maier
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU Affero General Public License as published by
12  * the Free Software Foundation; either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Affero General Public License for more details.
19  *
20  * You should have received a copy of the GNU Affero General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  *
23  */
24 #pragma once
25 
26 struct sockaddr_storage;
27 
29 
30 uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg,
31  const struct sockaddr_storage *ss);
32 int gsm0808_dec_aoip_trasp_addr(struct sockaddr_storage *ss,
33  const uint8_t *elem, uint8_t len);
34 uint8_t gsm0808_enc_speech_codec(struct msgb *msg,
35  const struct gsm0808_speech_codec *sc);
37  const uint8_t *elem, uint8_t len);
38 uint8_t gsm0808_enc_speech_codec_list(struct msgb *msg,
39  const struct gsm0808_speech_codec_list
40  *scl);
42  const uint8_t *elem, uint8_t len);
43 uint8_t gsm0808_enc_channel_type(struct msgb *msg,
44  const struct gsm0808_channel_type *ct);
46  const uint8_t *elem, uint8_t len);
47 uint8_t gsm0808_enc_encrypt_info(struct msgb *msg,
48  const struct gsm0808_encrypt_info *ei);
50  const uint8_t *elem, uint8_t len);
51 uint8_t gsm0808_enc_cell_id_list(struct msgb *msg,
52  const struct gsm0808_cell_id_list *cil);
54  const uint8_t *elem, uint8_t len);
55 int gsm0808_chan_type_to_speech_codec(uint8_t perm_spch);
57  uint8_t perm_spch);
58 
uint8_t gsm0808_enc_speech_codec_list(struct msgb *msg, const struct gsm0808_speech_codec_list *scl)
Encode TS 08.08 Speech Codec list.
Definition: gsm0808_utils.c:337
int gsm0808_dec_cell_id_list(struct gsm0808_cell_id_list *cil, const uint8_t *elem, uint8_t len)
Decode Cell Identifier List IE.
Definition: gsm0808_utils.c:614
uint8_t gsm0808_enc_encrypt_info(struct msgb *msg, const struct gsm0808_encrypt_info *ei)
Encode TS 08.08 Encryption Information IE.
Definition: gsm0808_utils.c:497
int gsm0808_dec_encrypt_info(struct gsm0808_encrypt_info *ei, const uint8_t *elem, uint8_t len)
Decode TS 08.08 Encryption Information IE.
Definition: gsm0808_utils.c:536
uint8_t gsm0808_enc_cell_id_list(struct msgb *msg, const struct gsm0808_cell_id_list *cil)
Encode TS 08.08 Cell Identifier List IE.
Definition: gsm0808_utils.c:574
Definition: gsm_08_08.h:475
uint8_t gsm0808_enc_aoip_trasp_addr(struct msgb *msg, const struct sockaddr_storage *ss)
uint8_t sc
Definition: gsm_04_08.h:91
int gsm0808_dec_aoip_trasp_addr(struct sockaddr_storage *ss, const uint8_t *elem, uint8_t len)
int gsm0808_speech_codec_from_chan_type(struct gsm0808_speech_codec *sc, uint8_t perm_spch)
Extrapolate a speech codec field from a given permitted speech parameter (channel type)...
Definition: gsm0808_utils.c:698
uint8_t len
Definition: gsm_04_11.h:434
uint8_t gsm0808_enc_channel_type(struct msgb *msg, const struct gsm0808_channel_type *ct)
Encode TS 08.08 Channel Type IE.
Definition: gsm0808_utils.c:417
Definition: gsm_08_08.h:482
Definition: gsm_08_08.h:492
int gsm0808_dec_speech_codec(struct gsm0808_speech_codec *sc, const uint8_t *elem, uint8_t len)
Decode TS 08.08 Speech Codec IE.
Definition: gsm0808_utils.c:257
int gsm0808_dec_speech_codec_list(struct gsm0808_speech_codec_list *scl, const uint8_t *elem, uint8_t len)
Decode TS 08.08 Speech Codec list IE.
Definition: gsm0808_utils.c:373
int gsm0808_dec_channel_type(struct gsm0808_channel_type *ct, const uint8_t *elem, uint8_t len)
Decode TS 08.08 Channel Type IE.
Definition: gsm0808_utils.c:460
uint8_t gsm0808_enc_speech_codec(struct msgb *msg, const struct gsm0808_speech_codec *sc)
Encode TS 08.08 Speech Codec IE.
Definition: gsm0808_utils.c:232
int gsm0808_chan_type_to_speech_codec(uint8_t perm_spch)
Convert the representation of the permitted speech codec identifier that is used in struct gsm0808_ch...
Definition: gsm0808_utils.c:660
Definition: gsm_08_08.h:501
Definition: gsm_08_08.h:443