blob: c6d11e105df6b4cac1bb1d382b9fcabdd5748e36 [file] [log] [blame]
Holger Hans Peter Freyther280cd512010-04-15 10:10:39 +02001/* (C) 2009,2010 by Holger Hans Peter Freyther <zecke@selfish.org>
2 * (C) 2009,2010 by On-Waves
3 * All Rights Reserved
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 */
20#ifndef OSMOCORE_GSM0808_H
21#define OSMOCORE_GSM0808_H
22
23#include "tlv.h"
24
25struct msgb;
26
Holger Hans Peter Freyther06f795c2010-07-23 18:20:02 +080027struct msgb *gsm0808_create_layer3(struct msgb *msg, uint16_t netcode, uint16_t countrycode, int lac, uint16_t ci);
Holger Hans Peter Freyther280cd512010-04-15 10:10:39 +020028struct msgb *gsm0808_create_reset(void);
Holger Hans Peter Freythera3f05d82010-10-27 11:49:24 +020029struct msgb *gsm0808_create_clear_command(uint8_t reason);
Holger Hans Peter Freyther280cd512010-04-15 10:10:39 +020030struct msgb *gsm0808_create_clear_complete(void);
Holger Hans Peter Freyther81716d52010-04-17 06:16:35 +020031struct msgb *gsm0808_create_cipher_complete(struct msgb *layer3, uint8_t alg_id);
Holger Hans Peter Freyther280cd512010-04-15 10:10:39 +020032struct msgb *gsm0808_create_cipher_reject(uint8_t cause);
33struct msgb *gsm0808_create_classmark_update(const uint8_t *classmark, uint8_t length);
34struct msgb *gsm0808_create_sapi_reject(uint8_t link_id);
Holger Hans Peter Freytherb60a4b32010-07-23 18:35:59 +080035struct msgb *gsm0808_create_assignment_completed(uint8_t rr_cause,
Holger Hans Peter Freytherba6172a2010-04-17 06:21:49 +020036 uint8_t chosen_channel, uint8_t encr_alg_id,
37 uint8_t speech_mode);
Holger Hans Peter Freyther280cd512010-04-15 10:10:39 +020038struct msgb *gsm0808_create_assignment_failure(uint8_t cause, uint8_t *rr_cause);
39
Holger Hans Peter Freytherc25c6682010-11-04 12:26:06 +010040struct msgb *gsm0808_create_dtap(struct msgb *msg, uint8_t link_id);
Holger Hans Peter Freyther9a3dec02010-05-16 08:15:40 +080041void gsm0808_prepend_dtap_header(struct msgb *msg, uint8_t link_id);
42
Holger Hans Peter Freyther280cd512010-04-15 10:10:39 +020043const struct tlv_definition *gsm0808_att_tlvdef();
44
Holger Hans Peter Freyther280cd512010-04-15 10:10:39 +020045#endif