aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-07-24 17:42:14 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-07-28 12:18:23 +0200
commitb5ce49f872afa739d8df24b3a7d657fef30730ea (patch)
treef83cc3b4538086460bf3435cace6e2ee09d170ae /include/osmocom
parent8757f42c8ef6c18ebb5884bfd3a44827af894c33 (diff)
cosmetic: reduce bsc_api.h
Remove as much as possible from bsc_api.h. Use '#pragma once'. Tweak head comment. BSC_API_CONN_POL_{ACCEPT,REJECT}: only user is static complete_layer3(), just use a bool return value instead. msc_connected(): only used in osmo_bsc_api.c, make static there. Instead of including gsm_data.h, declare structs opaquely, include stdint.h. codec_pref_test.c used this as indirect gsm_data.h include via osmo_bsc.h, include gsm_data.h there directly. osmo_bsc.h: instead of including bsc_api.h, declare opaque structs. gsm_04_08_rr.h: declare opaque structs to replace indirect include of gsm_data.h. Change-Id: Ia9c0f9828317236048e40ec9ecf9990592e2190a
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/bsc/bsc_api.h18
-rw-r--r--include/osmocom/bsc/gsm_04_08_rr.h13
-rw-r--r--include/osmocom/bsc/osmo_bsc.h3
3 files changed, 19 insertions, 15 deletions
diff --git a/include/osmocom/bsc/bsc_api.h b/include/osmocom/bsc/bsc_api.h
index dcfcc45f2..524129560 100644
--- a/include/osmocom/bsc/bsc_api.h
+++ b/include/osmocom/bsc/bsc_api.h
@@ -1,12 +1,10 @@
-/* GSM 08.08 like API for OpenBSC */
+/* GSM 08.08 function declarations for osmo-bsc */
-#ifndef OPENBSC_BSC_API_H
-#define OPENBSC_BSC_API_H
+#pragma once
-#include "gsm_data.h"
+#include <stdint.h>
-#define BSC_API_CONN_POL_ACCEPT 0
-#define BSC_API_CONN_POL_REJECT 1
+struct gsm_subscriber_connection;
void bsc_sapi_n_reject(struct gsm_subscriber_connection *conn, int dlci);
void bsc_cipher_mode_compl(struct gsm_subscriber_connection *conn, struct msgb *msg, uint8_t chosen_encr);
@@ -16,11 +14,3 @@ int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause);
void bsc_cm_update(struct gsm_subscriber_connection *conn,
const uint8_t *cm2, uint8_t cm2_len,
const uint8_t *cm3, uint8_t cm3_len);
-
-int gsm0808_submit_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg, uint8_t link_id,
- bool allow_sacch);
-int gsm0808_assign_req(struct gsm_subscriber_connection *conn, int chan_mode, int full_rate);
-int gsm0808_clear(struct gsm_subscriber_connection *conn);
-
-bool msc_connected(struct gsm_subscriber_connection *conn);
-#endif
diff --git a/include/osmocom/bsc/gsm_04_08_rr.h b/include/osmocom/bsc/gsm_04_08_rr.h
index 63bec7af3..8f46922a7 100644
--- a/include/osmocom/bsc/gsm_04_08_rr.h
+++ b/include/osmocom/bsc/gsm_04_08_rr.h
@@ -1,5 +1,18 @@
#pragma once
+#include <stdint.h>
+
+struct amr_mode;
+struct amr_multirate_conf;
+struct bsc_subscr;
+struct gsm48_chan_desc;
+struct gsm48_pag_resp;
+struct gsm_lchan;
+struct gsm_meas_rep;
+struct gsm_network;
+struct gsm_subscriber_connection;
+struct msgb;
+
void gsm_net_update_ctype(struct gsm_network *network);
enum gsm_chan_t get_ctype_by_chreq(struct gsm_network *network, uint8_t ra);
int get_reason_by_chreq(uint8_t ra, int neci);
diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 0e19b0bbc..bebfb2faa 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -2,7 +2,6 @@
#include <osmocom/gsm/protocol/gsm_04_08.h>
-#include <osmocom/bsc/bsc_api.h>
#include <osmocom/bsc/bsc_msg_filter.h>
#define BSS_SEND_USSD 1
@@ -18,6 +17,8 @@ struct bsc_msc_data;
struct gsm0808_channel_type;
struct gsm0808_speech_codec_list;
struct gsm_audio_support;
+struct gsm_subscriber_connection;
+struct gsm_bts;
struct bsc_api *osmo_bsc_api();