libosmogsm  0.11.0-dirty
Osmocom GSM library
include/osmocom/gsm/gsm0808.h
Go to the documentation of this file.
00001 
00004 /*
00005  * (C) 2009,2010 by Holger Hans Peter Freyther <zecke@selfish.org>
00006  * (C) 2009,2010 by On-Waves
00007  * All Rights Reserved
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License along
00020  * with this program; if not, write to the Free Software Foundation, Inc.,
00021  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00022  *
00023  */
00024 #pragma once
00025 
00026 #include "tlv.h"
00027 #include <osmocom/gsm/protocol/gsm_08_08.h>
00028 #include <osmocom/gsm/gsm23003.h>
00029 
00030 struct sockaddr_storage;
00031 
00032 struct msgb;
00033 struct gsm0808_cell_id_list2;
00034 
00035 struct msgb *gsm0808_create_layer3(struct msgb *msg_l3, uint16_t nc,
00036                                    uint16_t cc, int lac, uint16_t _ci)
00037         OSMO_DEPRECATED("Use gsm0808_create_layer3_2() instead, to not lose leading zeros in the MNC");
00038 struct msgb *gsm0808_create_layer3_aoip(const struct msgb *msg_l3, uint16_t nc,
00039                                         uint16_t cc, int lac, uint16_t _ci,
00040                                         const struct gsm0808_speech_codec_list *scl)
00041         OSMO_DEPRECATED("Use gsm0808_create_layer3_2() instead, to not lose leading zeros in the MNC");
00042 struct msgb *gsm0808_create_layer3_2(const struct msgb *msg_l3, const struct osmo_cell_global_id *cell,
00043                                      const struct gsm0808_speech_codec_list *scl);
00044 struct msgb *gsm0808_create_reset(void);
00045 struct msgb *gsm0808_create_reset_ack(void);
00046 struct msgb *gsm0808_create_clear_command(uint8_t reason);
00047 struct msgb *gsm0808_create_clear_complete(void);
00048 struct msgb *gsm0808_create_cipher(const struct gsm0808_encrypt_info *ei,
00049                                    const uint8_t *cipher_response_mode);
00050 struct msgb *gsm0808_create_cipher_complete(struct msgb *layer3, uint8_t alg_id);
00051 struct msgb *gsm0808_create_cipher_reject(uint8_t cause);
00052 struct msgb *gsm0808_create_classmark_update(const uint8_t *cm2, uint8_t cm2_len,
00053                                              const uint8_t *cm3, uint8_t cm3_len);
00054 struct msgb *gsm0808_create_sapi_reject(uint8_t link_id);
00055 struct msgb *gsm0808_create_ass(const struct gsm0808_channel_type *ct,
00056                                 const uint16_t *cic,
00057                                 const struct sockaddr_storage *ss,
00058                                 const struct gsm0808_speech_codec_list *scl,
00059                                 const uint32_t *ci);
00060 struct msgb *gsm0808_create_ass_compl(uint8_t rr_cause, uint8_t chosen_channel,
00061                                       uint8_t encr_alg_id, uint8_t speech_mode,
00062                                       const struct sockaddr_storage *ss,
00063                                       const struct gsm0808_speech_codec *sc,
00064                                       const struct gsm0808_speech_codec_list
00065                                       *scl);
00066 struct msgb *gsm0808_create_assignment_completed(uint8_t rr_cause,
00067                                                  uint8_t chosen_channel,
00068                                                  uint8_t encr_alg_id,
00069                                                  uint8_t speech_mode);
00070 struct msgb *gsm0808_create_ass_fail(uint8_t cause, const uint8_t *rr_cause,
00071                                      const struct gsm0808_speech_codec_list
00072                                      *scl);
00073 struct msgb *gsm0808_create_assignment_failure(uint8_t cause, uint8_t *rr_cause);
00074 struct msgb *gsm0808_create_clear_rqst(uint8_t cause);
00075 struct msgb *gsm0808_create_paging2(const char *imsi, const uint32_t *tmsi,
00076                                    const struct gsm0808_cell_id_list2 *cil,
00077                                    const uint8_t *chan_needed);
00078 struct msgb *gsm0808_create_paging(const char *imsi, const uint32_t *tmsi,
00079                                    const struct gsm0808_cell_id_list *cil,
00080                                    const uint8_t *chan_needed)
00081                                    OSMO_DEPRECATED("use gsm0808_create_paging2 instead");
00082 
00083 struct msgb *gsm0808_create_dtap(struct msgb *msg, uint8_t link_id);
00084 void gsm0808_prepend_dtap_header(struct msgb *msg, uint8_t link_id);
00085 
00086 const struct tlv_definition *gsm0808_att_tlvdef(void);
00087 
00088 const char *gsm0808_bssmap_name(uint8_t msg_type);
00089 const char *gsm0808_bssap_name(uint8_t msg_type);
00090 const char *gsm0808_cause_name(uint8_t cause);
00091 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines