gsm0808.h
Go to the documentation of this file.
/*
* (C) 2009,2010 by Holger Hans Peter Freyther <zecke@selfish.org>
* (C) 2009,2010 by On-Waves
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#pragma once
#include "tlv.h"
#include <osmocom/gsm/protocol/gsm_08_08.h>
#include <osmocom/gsm/gsm0808_utils.h>
#include <osmocom/gsm/gsm23003.h>
#include <osmocom/gsm/protocol/gsm_23_003.h>
#include <osmocom/core/utils.h>
#define BSSMAP_MSG_SIZE 1024
#define BSSMAP_MSG_HEADROOM 512
struct sockaddr_storage;
struct msgb;
struct gsm0808_cell_id_list2;
struct msgb *gsm0808_create_layer3(struct msgb *msg_l3, uint16_t nc,
uint16_t cc, int lac, uint16_t _ci)
OSMO_DEPRECATED("Use gsm0808_create_layer3_2() instead, to not lose leading zeros in the MNC");
struct msgb *gsm0808_create_layer3_aoip(const struct msgb *msg_l3, uint16_t nc,
uint16_t cc, int lac, uint16_t _ci,
const struct gsm0808_speech_codec_list *scl)
OSMO_DEPRECATED("Use gsm0808_create_layer3_2() instead, to not lose leading zeros in the MNC");
struct msgb *gsm0808_create_layer3_2(const struct msgb *msg_l3, const struct osmo_cell_global_id *cell,
const struct gsm0808_speech_codec_list *scl);
struct msgb *gsm0808_create_reset(void);
struct msgb *gsm0808_create_reset_ack(void);
struct msgb *gsm0808_create_clear_command(uint8_t cause);
struct msgb *gsm0808_create_clear_command2(uint8_t cause, bool csfb_ind);
struct msgb *gsm0808_create_clear_complete(void);
struct msgb *gsm0808_create_cipher(const struct gsm0808_encrypt_info *ei,
const uint8_t *cipher_response_mode);
struct gsm0808_cipher_mode_command {
struct gsm0808_encrypt_info ei;
bool cipher_response_mode_present;
uint8_t cipher_response_mode;
bool kc128_present;
uint8_t kc128[16];
/* more items are defined in the spec and may be added later */
bool more_items; /*< always set this to false */
};
struct msgb *gsm0808_create_cipher2(const struct gsm0808_cipher_mode_command *cmc);
struct msgb *gsm0808_create_cipher_complete(struct msgb *layer3, uint8_t alg_id);
struct msgb *gsm0808_create_cipher_reject(enum gsm0808_cause cause);
struct msgb *gsm0808_create_cipher_reject_ext(enum gsm0808_cause_class class, uint8_t ext);
struct msgb *gsm0808_create_classmark_request();
struct msgb *gsm0808_create_classmark_update(const uint8_t *cm2, uint8_t cm2_len,
const uint8_t *cm3, uint8_t cm3_len);
struct msgb *gsm0808_create_sapi_reject_cause(uint8_t link_id, uint16_t cause);
struct msgb *gsm0808_create_sapi_reject(uint8_t link_id)
OSMO_DEPRECATED("Use gsm0808_create_sapi_reject_cause() instead");
struct msgb *gsm0808_create_ass(const struct gsm0808_channel_type *ct,
const uint16_t *cic,
const struct sockaddr_storage *ss,
const struct gsm0808_speech_codec_list *scl,
const uint32_t *ci);
struct msgb *gsm0808_create_ass2(const struct gsm0808_channel_type *ct,
const uint16_t *cic,
const struct sockaddr_storage *ss,
const struct gsm0808_speech_codec_list *scl,
const uint32_t *ci,
const uint8_t *kc, const struct osmo_lcls *lcls);
struct msgb *gsm0808_create_ass_compl(uint8_t rr_cause, uint8_t chosen_channel,
uint8_t encr_alg_id, uint8_t speech_mode,
const struct sockaddr_storage *ss,
const struct gsm0808_speech_codec *sc,
const struct gsm0808_speech_codec_list
*scl);
struct msgb *gsm0808_create_ass_compl2(uint8_t rr_cause, uint8_t chosen_channel,
uint8_t encr_alg_id, uint8_t speech_mode,
const struct sockaddr_storage *ss,
const struct gsm0808_speech_codec *sc,
const struct gsm0808_speech_codec_list *scl,
enum gsm0808_lcls_status lcls_bss_status);
struct msgb *gsm0808_create_assignment_completed(uint8_t rr_cause,
uint8_t chosen_channel,
uint8_t encr_alg_id,
uint8_t speech_mode);
struct msgb *gsm0808_create_ass_fail(uint8_t cause, const uint8_t *rr_cause,
const struct gsm0808_speech_codec_list
*scl);
struct msgb *gsm0808_create_assignment_failure(uint8_t cause, uint8_t *rr_cause);
struct msgb *gsm0808_create_clear_rqst(uint8_t cause);
struct msgb *gsm0808_create_paging2(const char *imsi, const uint32_t *tmsi,
const struct gsm0808_cell_id_list2 *cil,
const uint8_t *chan_needed);
struct msgb *gsm0808_create_paging(const char *imsi, const uint32_t *tmsi,
const struct gsm0808_cell_id_list *cil,
const uint8_t *chan_needed)
OSMO_DEPRECATED("use gsm0808_create_paging2 instead");
struct msgb *gsm0808_create_lcls_conn_ctrl(enum gsm0808_lcls_config config,
enum gsm0808_lcls_control control);
struct msgb *gsm0808_create_lcls_conn_ctrl_ack(enum gsm0808_lcls_status status);
struct msgb *gsm0808_create_lcls_notification(enum gsm0808_lcls_status status, bool break_req);
struct msgb *gsm0808_create_common_id(const char *imsi,
const struct osmo_plmn_id *selected_plmn_id,
const struct osmo_plmn_id *last_used_eutran_plnm_id);
struct gsm0808_old_bss_to_new_bss_info {
bool extra_information_present;
struct {
bool prec;
bool lcs;
bool ue_prob;
} extra_information;
bool current_channel_type_2_present;
struct {
uint8_t mode;
uint8_t field;
} current_channel_type_2;
bool last_eutran_plmn_id_present;
struct osmo_plmn_id last_eutran_plmn_id;
/* more items are defined in the spec and may be added later */
bool more_items; /*< always set this to false */
};
struct gsm0808_handover_required {
uint16_t cause;
struct gsm0808_cell_id_list2 cil;
bool current_channel_type_1_present;
uint8_t current_channel_type_1;
bool speech_version_used_present;
enum gsm0808_permitted_speech speech_version_used;
bool old_bss_to_new_bss_info_present;
struct gsm0808_old_bss_to_new_bss_info old_bss_to_new_bss_info;
/* more items are defined in the spec and may be added later */
bool more_items; /*< always set this to false */
};
struct msgb *gsm0808_create_handover_required(const struct gsm0808_handover_required *params);
struct gsm0808_handover_required_reject {
uint16_t cause;
/* more items are defined in the spec and may be added later */
bool more_items; /*< always set this to false */
};
struct msgb *gsm0808_create_handover_required_reject(const struct gsm0808_handover_required_reject *params);
struct gsm0808_handover_request {
struct gsm0808_channel_type channel_type;
struct gsm0808_encrypt_info encryption_information;
struct osmo_gsm48_classmark classmark_information;
struct gsm0808_cell_id cell_identifier_serving;
struct gsm0808_cell_id cell_identifier_target;
enum gsm0808_cause cause;
bool current_channel_type_1_present;
uint8_t current_channel_type_1;
enum gsm0808_permitted_speech speech_version_used;
uint8_t chosen_encryption_algorithm_serving;
bool old_bss_to_new_bss_info_present;
struct gsm0808_old_bss_to_new_bss_info old_bss_to_new_bss_info;
const uint8_t *old_bss_to_new_bss_info_raw;
uint8_t old_bss_to_new_bss_info_raw_len;
const char *imsi;
const struct sockaddr_storage *aoip_transport_layer;
const struct gsm0808_speech_codec_list *codec_list_msc_preferred;
bool call_id_present;
uint32_t call_id;
const uint8_t *global_call_reference;
uint8_t global_call_reference_len;
/* more items are defined in the spec and may be added later */
bool more_items;
bool kc128_present;
uint8_t kc128[16];
bool more_items2;
};
struct msgb *gsm0808_create_handover_request(const struct gsm0808_handover_request *params);
struct msgb *gsm0808_create_handover_request_ack(const uint8_t *l3_info, uint8_t l3_info_len,
uint8_t chosen_channel, uint8_t chosen_encr_alg,
uint8_t chosen_speech_version);
struct gsm0808_handover_request_ack {
const uint8_t *l3_info;
uint8_t l3_info_len;
bool chosen_channel_present;
uint8_t chosen_channel;
uint8_t chosen_encr_alg;
/* chosen_speech_version == 0 omits the IE */
enum gsm0808_permitted_speech chosen_speech_version;
bool speech_codec_chosen_present;
struct gsm0808_speech_codec speech_codec_chosen;
const struct sockaddr_storage *aoip_transport_layer;
/* more items are defined in the spec and may be added later */
bool more_items;
};
struct msgb *gsm0808_create_handover_request_ack2(const struct gsm0808_handover_request_ack *params);
struct gsm0808_handover_command {
const uint8_t *l3_info;
uint8_t l3_info_len;
struct gsm0808_cell_id cell_identifier;
const uint8_t *new_bss_to_old_bss_info_raw;
size_t new_bss_to_old_bss_info_raw_len;
/* more items are defined in the spec and may be added later */
bool more_items;
};
struct msgb *gsm0808_create_handover_command(const struct gsm0808_handover_command *params);
struct msgb *gsm0808_create_handover_detect();
struct msgb *gsm0808_create_handover_succeeded();
struct gsm0808_handover_complete {
bool rr_cause_present;
uint8_t rr_cause;
bool speech_codec_chosen_present;
struct gsm0808_speech_codec speech_codec_chosen;
struct gsm0808_speech_codec_list codec_list_bss_supported; /*< omit when .len == 0 */
bool chosen_encr_alg_present;
uint8_t chosen_encr_alg;
bool chosen_channel_present;
uint8_t chosen_channel;
bool lcls_bss_status_present;
enum gsm0808_lcls_status lcls_bss_status;
/* more items are defined in the spec and may be added later */
bool more_items; /*< always set this to false */
};
struct msgb *gsm0808_create_handover_complete(const struct gsm0808_handover_complete *params);
struct gsm0808_handover_failure {
uint16_t cause;
bool rr_cause_present;
uint8_t rr_cause;
struct gsm0808_speech_codec_list codec_list_bss_supported; /*< omit when .len == 0 */
/* more items are defined in the spec and may be added later */
bool more_items; /*< always set this to false */
};
struct msgb *gsm0808_create_handover_failure(const struct gsm0808_handover_failure *params);
struct gsm0808_handover_performed {
uint16_t cause;
struct gsm0808_cell_id cell_id;
bool chosen_channel_present;
uint8_t chosen_channel;
bool chosen_encr_alg_present;
uint8_t chosen_encr_alg;
bool speech_version_chosen_present;
enum gsm0808_permitted_speech speech_version_chosen;
bool speech_codec_chosen_present;
struct gsm0808_speech_codec speech_codec_chosen;
bool lcls_bss_status_present;
enum gsm0808_lcls_status lcls_bss_status;
/* more items are defined in the spec and may be added later */
bool more_items; /*< always set this to false */
};
struct msgb *gsm0808_create_handover_performed(const struct gsm0808_handover_performed *params);
struct msgb *gsm0808_create_dtap(struct msgb *msg, uint8_t link_id);
void gsm0808_prepend_dtap_header(struct msgb *msg, uint8_t link_id);
const struct tlv_definition *gsm0808_att_tlvdef(void);
extern const struct tlv_definition gsm0808_old_bss_to_new_bss_info_att_tlvdef;
#define osmo_bssap_tlv_parse(dec, buf, len) tlv_parse(dec, gsm0808_att_tlvdef(), buf, len, 0, 0)
#define osmo_bssap_tlv_parse2(dec, dec_multiples, buf, len) \
tlv_parse2(dec, dec_multiples, gsm0808_att_tlvdef(), buf, len, 0, 0)
const char *gsm0808_bssmap_name(uint8_t msg_type);
const char *gsm0808_bssap_name(uint8_t msg_type);
const char *gsm0808_cause_name(enum gsm0808_cause cause);
const char *gsm0808_cause_class_name(enum gsm0808_cause_class class);
enum gsm0808_cause gsm0808_get_cause(const struct tlv_parsed *tp);
const char *gsm0808_diagnostics_octet_location_str(uint8_t pointer);
const char *gsm0808_diagnostics_bit_location_str(uint8_t bit_pointer);
extern const struct value_string gsm0808_lcls_config_names[];
extern const struct value_string gsm0808_lcls_control_names[];
extern const struct value_string gsm0808_lcls_status_names[];
static inline const char *gsm0808_lcls_config_name(enum gsm0808_lcls_config val) {
return get_value_string(gsm0808_lcls_config_names, val);
}
static inline const char *gsm0808_lcls_control_name(enum gsm0808_lcls_control val) {
return get_value_string(gsm0808_lcls_control_names, val);
}
static inline const char *gsm0808_lcls_status_name(enum gsm0808_lcls_status val) {
return get_value_string(gsm0808_lcls_status_names, val);
}
config
write Write running configuration to or terminal n Write configuration to the copy running config startup config
gsm0808_create_clear_rqst
struct msgb * gsm0808_create_clear_rqst(uint8_t cause)
Create BSSMAP Clear Request message.
Definition: gsm0808.c:722
gsm0808_create_handover_request_ack2
struct msgb * gsm0808_create_handover_request_ack2(const struct gsm0808_handover_request_ack *params)
Create BSSMAP HANDOVER REQUEST ACKNOWLEDGE message, 3GPP TS 48.008 3.2.1.10.
Definition: gsm0808.c:1025
gsm0808_create_reset
struct msgb * gsm0808_create_reset(void)
Create BSSMAP RESET message.
Definition: gsm0808.c:143
gsm0808_create_handover_request_ack
struct msgb * gsm0808_create_handover_request_ack(const uint8_t *l3_info, uint8_t l3_info_len, uint8_t chosen_channel, uint8_t chosen_encr_alg, uint8_t chosen_speech_version)
Same as gsm0808_create_handover_request_ack2() but with less parameters.
Definition: gsm0808.c:1064
gsm0808_create_common_id
struct msgb * gsm0808_create_common_id(const char *imsi, const struct osmo_plmn_id *selected_plmn_id, const struct osmo_plmn_id *last_used_eutran_plnm_id)
Create BSSMAP COMMON ID message, 3GPP TS 48.008 3.2.1.68.
Definition: gsm0808.c:1267
gsm0808_create_cipher2
struct msgb * gsm0808_create_cipher2(const struct gsm0808_cipher_mode_command *cmc)
Create BSSMAP Cipher Mode Command message.
Definition: gsm0808.c:251
gsm0808_create_assignment_failure
struct msgb * gsm0808_create_assignment_failure(uint8_t cause, uint8_t *rr_cause)
Create BSSMAP Assignment Failure message.
Definition: gsm0808.c:713
gsm0808_create_classmark_request
struct msgb * gsm0808_create_classmark_request()
Create BSSMAP Classmark Request message.
Definition: gsm0808.c:425
gsm0808_diagnostics_octet_location_str
const char * gsm0808_diagnostics_octet_location_str(uint8_t pointer)
Definition: gsm0808.c:1893
gsm0808_create_handover_failure
struct msgb * gsm0808_create_handover_failure(const struct gsm0808_handover_failure *params)
Create BSSMAP HANDOVER FAILURE message, 3GPP TS 48.008 3.2.1.16.
Definition: gsm0808.c:1188
gsm0808_create_lcls_conn_ctrl
struct msgb * gsm0808_create_lcls_conn_ctrl(enum gsm0808_lcls_config config, enum gsm0808_lcls_control control)
Create BSSMAP LCLS CONNECT CONTROL message (TS 48.008 3.2.1.91).
Definition: gsm0808.c:363
gsm0808_create_layer3_aoip
struct msgb * gsm0808_create_layer3_aoip(const struct msgb *msg_l3, uint16_t nc, uint16_t cc, int lac, uint16_t _ci, const struct gsm0808_speech_codec_list *scl) OSMO_DEPRECATED("Use gsm0808_create_layer3_2() instead
Create "Complete L3 Info" for AoIP, legacy implementation.
Definition: gsm0808.c:54
gsm0808_create_layer3
struct msgb * gsm0808_create_layer3(struct msgb *msg_l3, uint16_t nc, uint16_t cc, int lac, uint16_t _ci) OSMO_DEPRECATED("Use gsm0808_create_layer3_2() instead
Create "Complete L3 Info" for A, legacy implementation.
Definition: gsm0808.c:125
gsm0808_create_handover_required
struct msgb * gsm0808_create_handover_required(const struct gsm0808_handover_required *params)
Create BSSMAP HANDOVER REQUIRED message.
Definition: gsm0808.c:862
gsm0808_create_sapi_reject_cause
struct msgb * gsm0808_create_sapi_reject_cause(uint8_t link_id, uint16_t cause)
Create BSSMAP SAPI N Reject message.
Definition: gsm0808.c:466
gsm0808_bssmap_name
const char * gsm0808_bssmap_name(uint8_t msg_type)
Return string name of BSSMAP Message Type.
Definition: gsm0808.c:1729
gsm0808_att_tlvdef
const struct tlv_definition * gsm0808_att_tlvdef(void)
Definition: gsm0808.c:1591
gsm0808_create_cipher_reject
struct msgb * gsm0808_create_cipher_reject(enum gsm0808_cause cause)
Create BSSMAP Cipher Mode Reject message.
Definition: gsm0808.c:315
gsm0808_create_ass_compl
struct msgb * gsm0808_create_ass_compl(uint8_t rr_cause, uint8_t chosen_channel, uint8_t encr_alg_id, uint8_t speech_mode, const struct sockaddr_storage *ss, const struct gsm0808_speech_codec *sc, const struct gsm0808_speech_codec_list *scl)
Create BSSMAP Assignment Completed message.
Definition: gsm0808.c:650
gsm0808_create_classmark_update
struct msgb * gsm0808_create_classmark_update(const uint8_t *cm2, uint8_t cm2_len, const uint8_t *cm3, uint8_t cm3_len)
Create BSSMAP Classmark Update message.
Definition: gsm0808.c:443
gsm0808_bssap_name
const char * gsm0808_bssap_name(uint8_t msg_type)
Return string name of BSSAP Message Type.
Definition: gsm0808.c:1741
gsm0808_create_ass2
struct msgb * gsm0808_create_ass2(const struct gsm0808_channel_type *ct, const uint16_t *cic, const struct sockaddr_storage *ss, const struct gsm0808_speech_codec_list *scl, const uint32_t *ci, const uint8_t *kc, const struct osmo_lcls *lcls)
Create BSSMAP Assignment Request message, 3GPP TS 48.008 §3.2.1.1.
Definition: gsm0808.c:502
gsm0808_lcls_control_name
static const char * gsm0808_lcls_control_name(enum gsm0808_lcls_control val)
Definition: gsm0808.h:366
gsm0808_old_bss_to_new_bss_info_att_tlvdef
const struct tlv_definition gsm0808_old_bss_to_new_bss_info_att_tlvdef
Definition: gsm0808.c:1597
gsm0808_create_ass_compl2
struct msgb * gsm0808_create_ass_compl2(uint8_t rr_cause, uint8_t chosen_channel, uint8_t encr_alg_id, uint8_t speech_mode, const struct sockaddr_storage *ss, const struct gsm0808_speech_codec *sc, const struct gsm0808_speech_codec_list *scl, enum gsm0808_lcls_status lcls_bss_status)
Create BSSMAP Assignment Completed message as per 3GPP TS 48.008 §3.2.1.2.
Definition: gsm0808.c:587
gsm0808_cause_name
const char * gsm0808_cause_name(enum gsm0808_cause cause)
Return string name of BSSMAP Cause name.
Definition: gsm0808.c:1872
MNC
struct msgb to not lose leading zeros in the MNC
Definition: gsm0808.h:43
gsm0808_lcls_status_name
static const char * gsm0808_lcls_status_name(enum gsm0808_lcls_status val)
Definition: gsm0808.h:369
gsm0808_lcls_config_names
const struct value_string gsm0808_lcls_config_names[]
Definition: gsm0808.c:1926
gsm0808_create_handover_succeeded
struct msgb * gsm0808_create_handover_succeeded()
Create BSSMAP HANDOVER SUCCEEDED message, 3GPP TS 48.008 3.2.1.13.
Definition: gsm0808.c:1130
gsm0808_create_handover_command
struct msgb * gsm0808_create_handover_command(const struct gsm0808_handover_command *params)
Create BSSMAP HANDOVER COMMAND message, 3GPP TS 48.008 3.2.1.11.
Definition: gsm0808.c:1081
gsm0808_create_ass_fail
struct msgb * gsm0808_create_ass_fail(uint8_t cause, const uint8_t *rr_cause, const struct gsm0808_speech_codec_list *scl)
Create BSSMAP Assignment Failure message.
Definition: gsm0808.c:680
gsm0808_cause_class_name
const char * gsm0808_cause_class_name(enum gsm0808_cause_class class)
Return string name of BSSMAP Cause Class name.
Definition: gsm0808.c:1866
gsm0808_diagnostics_bit_location_str
const char * gsm0808_diagnostics_bit_location_str(uint8_t bit_pointer)
Definition: gsm0808.c:1912
gsm0808_create_cipher_reject_ext
struct msgb * gsm0808_create_cipher_reject_ext(enum gsm0808_cause_class class, uint8_t ext)
Create BSSMAP Cipher Mode Reject message.
Definition: gsm0808.c:335
gsm0808_create_paging
struct msgb * gsm0808_create_paging(const char *imsi, const uint32_t *tmsi, const struct gsm0808_cell_id_list *cil, const uint8_t *chan_needed) OSMO_DEPRECATED("use gsm0808_create_paging2 instead")
DEPRECATED: Use gsm0808_create_paging2 instead.
Definition: gsm0808.c:802
gsm0808_create_handover_request
struct msgb * gsm0808_create_handover_request(const struct gsm0808_handover_request *params)
Create BSSMAP HANDOVER REQUEST message, 3GPP TS 48.008 3.2.1.8.
Definition: gsm0808.c:922
gsm0808_create_paging2
struct msgb * gsm0808_create_paging2(const char *imsi, const uint32_t *tmsi, const struct gsm0808_cell_id_list2 *cil, const uint8_t *chan_needed)
Create BSSMAP PAGING message.
Definition: gsm0808.c:744
gsm0808_create_handover_detect
struct msgb * gsm0808_create_handover_detect()
Create BSSMAP HANDOVER DETECT message, 3GPP TS 48.008 3.2.1.40.
Definition: gsm0808.c:1111
gsm0808_get_cause
enum gsm0808_cause gsm0808_get_cause(const struct tlv_parsed *tp)
Parse Cause TLV 3GPP TS 08.08 §3.2.2.5.
Definition: gsm0808.c:1877
gsm0808_create_handover_performed
struct msgb * gsm0808_create_handover_performed(const struct gsm0808_handover_performed *params)
Create BSSMAP HANDOVER PERFORMED message, 3GPP TS 48.008 3.2.1.25.
Definition: gsm0808.c:1219
gsm0808_prepend_dtap_header
void gsm0808_prepend_dtap_header(struct msgb *msg, uint8_t link_id)
Prepend a DTAP header to given Message Buffer.
Definition: gsm0808.c:1320
gsm0808_lcls_control_names
const struct value_string gsm0808_lcls_control_names[]
Definition: gsm0808.c:1942
gsm0808_create_handover_complete
struct msgb * gsm0808_create_handover_complete(const struct gsm0808_handover_complete *params)
Create BSSMAP HANDOVER COMPLETE message, 3GPP TS 48.008 3.2.1.12.
Definition: gsm0808.c:1149
gsm0808_create_clear_command2
struct msgb * gsm0808_create_clear_command2(uint8_t cause, bool csfb_ind)
Create BSSMAP Clear Command message.
Definition: gsm0808.c:213
gsm0808_create_sapi_reject
struct msgb * gsm0808_create_sapi_reject(uint8_t link_id) OSMO_DEPRECATED("Use gsm0808_create_sapi_reject_cause() instead")
Create BSSMAP SAPI N Reject message (with hard-coded cause "BSS not equipped").
Definition: gsm0808.c:487
gsm0808_create_handover_required_reject
struct msgb * gsm0808_create_handover_required_reject(const struct gsm0808_handover_required_reject *params)
Create BSSMAP HANDOVER REQUIRED REJECT message.
Definition: gsm0808.c:898
gsm0808_create_cipher_complete
struct msgb * gsm0808_create_cipher_complete(struct msgb *layer3, uint8_t alg_id)
Create BSSMAP Cipher Mode Complete message.
Definition: gsm0808.c:286
gsm0808_create_clear_complete
struct msgb * gsm0808_create_clear_complete(void)
Create BSSMAP Clear Complete message.
Definition: gsm0808.c:175
gsm0808_create_assignment_completed
struct msgb * gsm0808_create_assignment_completed(uint8_t rr_cause, uint8_t chosen_channel, uint8_t encr_alg_id, uint8_t speech_mode)
Create BSSMAP Assignment Completed message.
Definition: gsm0808.c:666
gsm0808_create_ass
struct msgb * gsm0808_create_ass(const struct gsm0808_channel_type *ct, const uint16_t *cic, const struct sockaddr_storage *ss, const struct gsm0808_speech_codec_list *scl, const uint32_t *ci)
Create BSSMAP Assignment Request message, 3GPP TS 48.008 §3.2.1.1.
Definition: gsm0808.c:568
gsm0808_create_layer3_2
struct msgb * gsm0808_create_layer3_2(const struct msgb *msg_l3, const struct osmo_cell_global_id *cell, const struct gsm0808_speech_codec_list *scl)
Create "Complete L3 Info" for AoIP.
Definition: gsm0808.c:77
gsm0808_lcls_status_names
const struct value_string gsm0808_lcls_status_names[]
Definition: gsm0808.c:1952
gsm0808_create_cipher
struct msgb * gsm0808_create_cipher(const struct gsm0808_encrypt_info *ei, const uint8_t *cipher_response_mode)
Superseded by gsm0808_create_cipher2() to include Kc128.
Definition: gsm0808.c:237
gsm0808_lcls_config_name
static const char * gsm0808_lcls_config_name(enum gsm0808_lcls_config val)
Definition: gsm0808.h:363
gsm0808_create_lcls_notification
struct msgb * gsm0808_create_lcls_notification(enum gsm0808_lcls_status status, bool break_req)
Create BSSMAP LCLS NOTIFICATION message (TS 48.008 3.2.1.93).
Definition: gsm0808.c:407
gsm0808_create_lcls_conn_ctrl_ack
struct msgb * gsm0808_create_lcls_conn_ctrl_ack(enum gsm0808_lcls_status status)
Create BSSMAP LCLS CONNECT CONTROL ACK message (TS 48.008 3.2.1.92).
Definition: gsm0808.c:389
gsm0808_create_dtap
struct msgb * gsm0808_create_dtap(struct msgb *msg, uint8_t link_id)
Create BSSMAP DTAP message.
Definition: gsm0808.c:1332
gsm0808_create_clear_command
struct msgb * gsm0808_create_clear_command(uint8_t cause)
Create BSSMAP Clear Command message with BSSAP header before l3h and BSSMAP in l3h.
Definition: gsm0808.c:195
gsm0808_create_reset_ack
struct msgb * gsm0808_create_reset_ack(void)
Create BSSMAP RESET ACK message.
Definition: gsm0808.c:160
OSMO_DEPRECATED
#define OSMO_DEPRECATED(text)
get_value_string
const char * get_value_string(const struct value_string *vs, uint32_t val)
gsm0808_utils.h
gsm23003.h
cause
uint8_t cause
Definition: gsm_04_08.h:2
cm2_len
uint8_t cm2_len
Definition: gsm_04_08.h:0
lac
uint16_t lac
Definition: gsm_04_08.h:1
cm2
struct gsm48_classmark2 cm2
Definition: gsm_04_08.h:1
rr_cause
uint8_t rr_cause
Definition: gsm_04_08.h:0
msg_type
uint8_t msg_type
Definition: gsm_04_08.h:2
gsm_08_08.h
gsm0808_cause
gsm0808_cause
Definition: gsm_08_08.h:362
msg
uint8_t msg[0]
Definition: gsm_08_08.h:8
gsm0808_lcls_status
gsm0808_lcls_status
Definition: gsm_08_08.h:664
gsm0808_cause_class
gsm0808_cause_class
Definition: gsm_08_08.h:429
gsm0808_lcls_control
gsm0808_lcls_control
Definition: gsm_08_08.h:654
gsm0808_lcls_config
gsm0808_lcls_config
Definition: gsm_08_08.h:643
gsm0808_permitted_speech
gsm0808_permitted_speech
GSM 08.08 3.2.2.11 Channel Type (see also 3GPP TS 48.008, section 3.2.2.11)
Definition: gsm_08_08.h:487
link_id
uint8_t link_id
Definition: gsm_08_08.h:2
params
uint8_t params[0]
Definition: gsm_08_58.h:6
gsm_23_003.h
instead
_parse instead
Definition: ipa.h:30
gsm0808_cell_id_list2
Parsed representation of a Cell Identifier List IE (3GPP TS 48.008 3.2.2.27).
Definition: gsm0808_utils.h:57
gsm0808_cell_id_list
DEPRECATED: This definition of the cell identifier list is insufficient.
Definition: gsm_08_08.h:636
gsm0808_cell_id
Parsed representation of Cell Identifier IE (3GPP TS 48.008 3.2.2.17)
Definition: gsm0808_utils.h:51
gsm0808_channel_type
Definition: gsm_08_08.h:612
gsm0808_cipher_mode_command
Definition: gsm0808.h:58
gsm0808_cipher_mode_command::cipher_response_mode_present
bool cipher_response_mode_present
3GPP TS 48.008 3.2.2.34 Cipher Response Mode, optional IE
Definition: gsm0808.h:62
gsm0808_cipher_mode_command::cipher_response_mode
uint8_t cipher_response_mode
3GPP TS 48.008 3.2.2.34 Cipher Response Mode: 0 - IMEISV must not be included by the Mobile Station; ...
Definition: gsm0808.h:67
gsm0808_cipher_mode_command::kc128_present
bool kc128_present
Definition: gsm0808.h:69
gsm0808_cipher_mode_command::more_items
bool more_items
Definition: gsm0808.h:73
gsm0808_encrypt_info
Definition: gsm_08_08.h:622
gsm0808_handover_command
Definition: gsm0808.h:258
gsm0808_handover_command::new_bss_to_old_bss_info_raw
const uint8_t * new_bss_to_old_bss_info_raw
Definition: gsm0808.h:264
gsm0808_handover_command::more_items
bool more_items
always set this to false
Definition: gsm0808.h:268
gsm0808_handover_command::l3_info_len
uint8_t l3_info_len
Definition: gsm0808.h:260
gsm0808_handover_command::l3_info
const uint8_t * l3_info
Definition: gsm0808.h:259
gsm0808_handover_command::new_bss_to_old_bss_info_raw_len
size_t new_bss_to_old_bss_info_raw_len
Definition: gsm0808.h:265
gsm0808_handover_command::cell_identifier
struct gsm0808_cell_id cell_identifier
Definition: gsm0808.h:262
gsm0808_handover_complete
Definition: gsm0808.h:275
gsm0808_handover_complete::rr_cause
uint8_t rr_cause
Definition: gsm0808.h:277
gsm0808_handover_complete::lcls_bss_status_present
bool lcls_bss_status_present
Definition: gsm0808.h:290
gsm0808_handover_complete::lcls_bss_status
enum gsm0808_lcls_status lcls_bss_status
Definition: gsm0808.h:291
gsm0808_handover_complete::rr_cause_present
bool rr_cause_present
Definition: gsm0808.h:276
gsm0808_handover_complete::chosen_encr_alg
uint8_t chosen_encr_alg
Definition: gsm0808.h:285
gsm0808_handover_complete::speech_codec_chosen
struct gsm0808_speech_codec speech_codec_chosen
Definition: gsm0808.h:280
gsm0808_handover_complete::codec_list_bss_supported
struct gsm0808_speech_codec_list codec_list_bss_supported
Definition: gsm0808.h:282
gsm0808_handover_complete::chosen_channel
uint8_t chosen_channel
Definition: gsm0808.h:288
gsm0808_handover_complete::chosen_channel_present
bool chosen_channel_present
Definition: gsm0808.h:287
gsm0808_handover_complete::speech_codec_chosen_present
bool speech_codec_chosen_present
Definition: gsm0808.h:279
gsm0808_handover_complete::more_items
bool more_items
Definition: gsm0808.h:294
gsm0808_handover_complete::chosen_encr_alg_present
bool chosen_encr_alg_present
Definition: gsm0808.h:284
gsm0808_handover_failure
Definition: gsm0808.h:298
gsm0808_handover_failure::rr_cause_present
bool rr_cause_present
Definition: gsm0808.h:301
gsm0808_handover_failure::codec_list_bss_supported
struct gsm0808_speech_codec_list codec_list_bss_supported
Definition: gsm0808.h:304
gsm0808_handover_failure::more_items
bool more_items
Definition: gsm0808.h:307
gsm0808_handover_failure::cause
uint16_t cause
Definition: gsm0808.h:299
gsm0808_handover_failure::rr_cause
uint8_t rr_cause
Definition: gsm0808.h:302
gsm0808_handover_performed
Definition: gsm0808.h:311
gsm0808_handover_performed::speech_version_chosen
enum gsm0808_permitted_speech speech_version_chosen
Definition: gsm0808.h:322
gsm0808_handover_performed::chosen_encr_alg_present
bool chosen_encr_alg_present
Definition: gsm0808.h:318
gsm0808_handover_performed::speech_codec_chosen
struct gsm0808_speech_codec speech_codec_chosen
Definition: gsm0808.h:325
gsm0808_handover_performed::cause
uint16_t cause
Definition: gsm0808.h:312
gsm0808_handover_performed::lcls_bss_status
enum gsm0808_lcls_status lcls_bss_status
Definition: gsm0808.h:328
gsm0808_handover_performed::speech_codec_chosen_present
bool speech_codec_chosen_present
Definition: gsm0808.h:324
gsm0808_handover_performed::speech_version_chosen_present
bool speech_version_chosen_present
Definition: gsm0808.h:321
gsm0808_handover_performed::chosen_encr_alg
uint8_t chosen_encr_alg
Definition: gsm0808.h:319
gsm0808_handover_performed::lcls_bss_status_present
bool lcls_bss_status_present
Definition: gsm0808.h:327
gsm0808_handover_performed::cell_id
struct gsm0808_cell_id cell_id
Definition: gsm0808.h:313
gsm0808_handover_performed::chosen_channel
uint8_t chosen_channel
Definition: gsm0808.h:316
gsm0808_handover_performed::chosen_channel_present
bool chosen_channel_present
Definition: gsm0808.h:315
gsm0808_handover_performed::more_items
bool more_items
Definition: gsm0808.h:331
gsm0808_handover_request_ack
Definition: gsm0808.h:234
gsm0808_handover_request_ack::l3_info_len
uint8_t l3_info_len
Definition: gsm0808.h:236
gsm0808_handover_request_ack::speech_codec_chosen_present
bool speech_codec_chosen_present
Definition: gsm0808.h:248
gsm0808_handover_request_ack::chosen_speech_version
enum gsm0808_permitted_speech chosen_speech_version
Definition: gsm0808.h:246
gsm0808_handover_request_ack::more_items
bool more_items
always set this to false
Definition: gsm0808.h:254
gsm0808_handover_request_ack::speech_codec_chosen
struct gsm0808_speech_codec speech_codec_chosen
Definition: gsm0808.h:249
gsm0808_handover_request_ack::aoip_transport_layer
const struct sockaddr_storage * aoip_transport_layer
Definition: gsm0808.h:251
gsm0808_handover_request_ack::chosen_channel
uint8_t chosen_channel
Definition: gsm0808.h:239
gsm0808_handover_request_ack::l3_info
const uint8_t * l3_info
Definition: gsm0808.h:235
gsm0808_handover_request_ack::chosen_channel_present
bool chosen_channel_present
Definition: gsm0808.h:238
gsm0808_handover_request_ack::chosen_encr_alg
uint8_t chosen_encr_alg
For A5/N set chosen_encr_alg = N+1, e.g.
Definition: gsm0808.h:243
gsm0808_handover_request
3GPP TS 48.008 §3.2.1.8 HANDOVER REQUEST
Definition: gsm0808.h:185
gsm0808_handover_request::current_channel_type_1
uint8_t current_channel_type_1
Definition: gsm0808.h:194
gsm0808_handover_request::cell_identifier_serving
struct gsm0808_cell_id cell_identifier_serving
Definition: gsm0808.h:189
gsm0808_handover_request::more_items2
bool more_items2
always set this to false
Definition: gsm0808.h:226
gsm0808_handover_request::current_channel_type_1_present
bool current_channel_type_1_present
Definition: gsm0808.h:193
gsm0808_handover_request::old_bss_to_new_bss_info_raw_len
uint8_t old_bss_to_new_bss_info_raw_len
Definition: gsm0808.h:206
gsm0808_handover_request::global_call_reference_len
uint8_t global_call_reference_len
Definition: gsm0808.h:218
gsm0808_handover_request::old_bss_to_new_bss_info_present
bool old_bss_to_new_bss_info_present
Pass either old_bss_to_new_bss_info or old_bss_to_new_bss_info_raw.
Definition: gsm0808.h:201
gsm0808_handover_request::chosen_encryption_algorithm_serving
uint8_t chosen_encryption_algorithm_serving
Definition: gsm0808.h:198
gsm0808_handover_request::imsi
const char * imsi
Definition: gsm0808.h:208
gsm0808_handover_request::cell_identifier_target
struct gsm0808_cell_id cell_identifier_target
Definition: gsm0808.h:190
gsm0808_handover_request::cause
enum gsm0808_cause cause
Definition: gsm0808.h:191
gsm0808_handover_request::aoip_transport_layer
const struct sockaddr_storage * aoip_transport_layer
Definition: gsm0808.h:210
gsm0808_handover_request::speech_version_used
enum gsm0808_permitted_speech speech_version_used
Definition: gsm0808.h:196
gsm0808_handover_request::global_call_reference
const uint8_t * global_call_reference
Definition: gsm0808.h:217
gsm0808_handover_request::channel_type
struct gsm0808_channel_type channel_type
Definition: gsm0808.h:186
gsm0808_handover_request::codec_list_msc_preferred
const struct gsm0808_speech_codec_list * codec_list_msc_preferred
Definition: gsm0808.h:212
gsm0808_handover_request::encryption_information
struct gsm0808_encrypt_info encryption_information
Definition: gsm0808.h:187
gsm0808_handover_request::kc128
uint8_t kc128[16]
Definition: gsm0808.h:224
gsm0808_handover_request::old_bss_to_new_bss_info_raw
const uint8_t * old_bss_to_new_bss_info_raw
To feed the Old BSS to New BSS Information IE unchanged from the Handover Required message without ha...
Definition: gsm0808.h:205
gsm0808_handover_request::old_bss_to_new_bss_info
struct gsm0808_old_bss_to_new_bss_info old_bss_to_new_bss_info
Definition: gsm0808.h:202
gsm0808_handover_request::classmark_information
struct osmo_gsm48_classmark classmark_information
Definition: gsm0808.h:188
gsm0808_handover_request::kc128_present
bool kc128_present
Definition: gsm0808.h:223
gsm0808_handover_request::call_id
uint32_t call_id
Definition: gsm0808.h:215
gsm0808_handover_request::more_items
bool more_items
set this to true iff any fields below are used
Definition: gsm0808.h:221
gsm0808_handover_request::call_id_present
bool call_id_present
Definition: gsm0808.h:214
gsm0808_handover_required_reject
3GPP TS 48.008 §3.2.1.37 HANDOVER REQUIRED REJECT
Definition: gsm0808.h:176
gsm0808_handover_required_reject::more_items
bool more_items
Definition: gsm0808.h:180
gsm0808_handover_required_reject::cause
uint16_t cause
Definition: gsm0808.h:177
gsm0808_handover_required
3GPP TS 48.008 §3.2.1.9 HANDOVER REQUIRED
Definition: gsm0808.h:157
gsm0808_handover_required::cil
struct gsm0808_cell_id_list2 cil
Definition: gsm0808.h:159
gsm0808_handover_required::more_items
bool more_items
Definition: gsm0808.h:171
gsm0808_handover_required::cause
uint16_t cause
Definition: gsm0808.h:158
gsm0808_handover_required::current_channel_type_1_present
bool current_channel_type_1_present
Definition: gsm0808.h:161
gsm0808_handover_required::speech_version_used_present
bool speech_version_used_present
Definition: gsm0808.h:164
gsm0808_handover_required::old_bss_to_new_bss_info_present
bool old_bss_to_new_bss_info_present
Definition: gsm0808.h:167
gsm0808_handover_required::current_channel_type_1
uint8_t current_channel_type_1
Definition: gsm0808.h:162
gsm0808_handover_required::old_bss_to_new_bss_info
struct gsm0808_old_bss_to_new_bss_info old_bss_to_new_bss_info
Definition: gsm0808.h:168
gsm0808_handover_required::speech_version_used
enum gsm0808_permitted_speech speech_version_used
Definition: gsm0808.h:165
gsm0808_old_bss_to_new_bss_info
3GPP TS 48.008 §3.2.2.5.8 Old BSS to New BSS information
Definition: gsm0808.h:135
gsm0808_old_bss_to_new_bss_info::extra_information_present
bool extra_information_present
Definition: gsm0808.h:136
gsm0808_old_bss_to_new_bss_info::last_eutran_plmn_id_present
bool last_eutran_plmn_id_present
Definition: gsm0808.h:149
gsm0808_old_bss_to_new_bss_info::current_channel_type_2
struct gsm0808_old_bss_to_new_bss_info::@7 current_channel_type_2
gsm0808_old_bss_to_new_bss_info::field
uint8_t field
Definition: gsm0808.h:146
gsm0808_old_bss_to_new_bss_info::current_channel_type_2_present
bool current_channel_type_2_present
Definition: gsm0808.h:143
gsm0808_old_bss_to_new_bss_info::mode
uint8_t mode
Definition: gsm0808.h:145
gsm0808_old_bss_to_new_bss_info::extra_information
struct gsm0808_old_bss_to_new_bss_info::@6 extra_information
gsm0808_old_bss_to_new_bss_info::last_eutran_plmn_id
struct osmo_plmn_id last_eutran_plmn_id
Definition: gsm0808.h:150
gsm0808_old_bss_to_new_bss_info::lcs
bool lcs
Definition: gsm0808.h:139
gsm0808_old_bss_to_new_bss_info::ue_prob
bool ue_prob
Definition: gsm0808.h:140
gsm0808_old_bss_to_new_bss_info::prec
bool prec
Definition: gsm0808.h:138
gsm0808_old_bss_to_new_bss_info::more_items
bool more_items
Definition: gsm0808.h:153
gsm0808_speech_codec_list
Definition: gsm_08_08.h:605
gsm0808_speech_codec
3GPP TS 48.008 3.2.2.104 Speech Codec
Definition: gsm_08_08.h:543
msgb
osmo_cell_global_id
Definition: gsm23003.h:28
osmo_gsm48_classmark
Definition: gsm_04_08.h:230
osmo_lcls
LCLS-related parameters from 3GPP TS 48.008.
Definition: gsm0808_utils.h:64
osmo_plmn_id
Definition: gsm23003.h:9
tlv_definition
Definition of All 256 IE / TLV.
Definition: tlv.h:517
tlv_parsed
result of the TLV parser
Definition: tlv.h:522
value_string
tlv.h
utils.h