Get rid of internal.h
Let's create missing header files and move stuff around to have a clear view of who implements what. Change-Id: Ib32091d716b33bca58e2d3acf8840b52824c0bd3
This commit is contained in:
parent
36be606dd4
commit
881d5bab4b
|
@ -4,9 +4,12 @@ noinst_HEADERS = \
|
||||||
cbc_message.h \
|
cbc_message.h \
|
||||||
cbc_vty.h \
|
cbc_vty.h \
|
||||||
cbsp_server.h \
|
cbsp_server.h \
|
||||||
|
cbsp_server_fsm.h \
|
||||||
charset.h \
|
charset.h \
|
||||||
internal.h \
|
debug.h \
|
||||||
sbcap_msg.h \
|
sbcap_msg.h \
|
||||||
sbcap_server.h \
|
sbcap_server.h \
|
||||||
|
sbcap_server_fsm.h \
|
||||||
rest_it_op.h \
|
rest_it_op.h \
|
||||||
|
smscb_message_fsm.h \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include <osmocom/gsm/protocol/gsm_48_049.h>
|
#include <osmocom/gsm/protocol/gsm_48_049.h>
|
||||||
#include <osmocom/gsm/gsm23003.h>
|
#include <osmocom/gsm/gsm23003.h>
|
||||||
|
|
||||||
struct rest_it_op;
|
|
||||||
|
|
||||||
#define CBC_MAX_LOC_ADDRS 8
|
#define CBC_MAX_LOC_ADDRS 8
|
||||||
|
|
||||||
enum cbc_cell_id_type {
|
enum cbc_cell_id_type {
|
||||||
|
@ -72,3 +70,7 @@ struct cbc {
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct cbc *g_cbc;
|
extern struct cbc *g_cbc;
|
||||||
|
|
||||||
|
/* rest_api.c */
|
||||||
|
int rest_api_init(void *ctx, const char *bind_addr, uint16_t port);
|
||||||
|
void rest_api_fin(void);
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <osmocom/core/fsm.h>
|
||||||
|
|
||||||
|
extern struct osmo_fsm cbsp_server_fsm;
|
||||||
|
|
||||||
|
enum cbsp_server_event {
|
||||||
|
CBSP_SRV_E_RX_RST_COMPL, /* reset complete received */
|
||||||
|
CBSP_SRV_E_RX_RST_FAIL, /* reset failure received */
|
||||||
|
CBSP_SRV_E_RX_KA_COMPL, /* keep-alive complete received */
|
||||||
|
CBSP_SRV_E_RX_RESTART, /* restart received */
|
||||||
|
CBSP_SRV_E_CMD_RESET, /* RESET command from CBC */
|
||||||
|
CBSP_SRV_E_CMD_CLOSE, /* CLOSE command from CBC */
|
||||||
|
};
|
|
@ -0,0 +1,7 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
enum {
|
||||||
|
DCBSP,
|
||||||
|
DSBcAP,
|
||||||
|
DREST,
|
||||||
|
};
|
|
@ -0,0 +1,15 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <osmocom/core/fsm.h>
|
||||||
|
|
||||||
|
extern struct osmo_fsm sbcap_server_fsm;
|
||||||
|
|
||||||
|
enum sbcap_server_event {
|
||||||
|
SBcAP_SRV_E_RX_RST_COMPL, /* reset complete received */
|
||||||
|
SBcAP_SRV_E_RX_RST_FAIL, /* reset failure received */
|
||||||
|
SBcAP_SRV_E_RX_KA_COMPL, /* keep-alive complete received */
|
||||||
|
SBcAP_SRV_E_RX_RESTART, /* restart received */
|
||||||
|
SBcAP_SRV_E_CMD_RESET, /* RESET command from CBC */
|
||||||
|
SBcAP_SRV_E_CMD_CLOSE, /* CLOSE command from CBC */
|
||||||
|
};
|
|
@ -1,48 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <osmocom/core/logging.h>
|
|
||||||
#include <osmocom/core/fsm.h>
|
#include <osmocom/core/fsm.h>
|
||||||
#include <osmocom/vty/command.h>
|
|
||||||
|
|
||||||
#include <osmocom/cbc/cbc_data.h>
|
|
||||||
|
|
||||||
enum {
|
|
||||||
DCBSP,
|
|
||||||
DSBcAP,
|
|
||||||
DREST,
|
|
||||||
};
|
|
||||||
|
|
||||||
extern struct osmo_fsm cbsp_server_fsm;
|
|
||||||
|
|
||||||
enum cbsp_server_event {
|
|
||||||
CBSP_SRV_E_RX_RST_COMPL, /* reset complete received */
|
|
||||||
CBSP_SRV_E_RX_RST_FAIL, /* reset failure received */
|
|
||||||
CBSP_SRV_E_RX_KA_COMPL, /* keep-alive complete received */
|
|
||||||
CBSP_SRV_E_RX_RESTART, /* restart received */
|
|
||||||
CBSP_SRV_E_CMD_RESET, /* RESET command from CBC */
|
|
||||||
CBSP_SRV_E_CMD_CLOSE, /* CLOSE command from CBC */
|
|
||||||
};
|
|
||||||
|
|
||||||
extern struct osmo_fsm sbcap_server_fsm;
|
|
||||||
|
|
||||||
enum sbcap_server_event {
|
|
||||||
SBcAP_SRV_E_RX_RST_COMPL, /* reset complete received */
|
|
||||||
SBcAP_SRV_E_RX_RST_FAIL, /* reset failure received */
|
|
||||||
SBcAP_SRV_E_RX_KA_COMPL, /* keep-alive complete received */
|
|
||||||
SBcAP_SRV_E_RX_RESTART, /* restart received */
|
|
||||||
SBcAP_SRV_E_CMD_RESET, /* RESET command from CBC */
|
|
||||||
SBcAP_SRV_E_CMD_CLOSE, /* CLOSE command from CBC */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* rest_api.c */
|
|
||||||
int rest_api_init(void *ctx, const char *bind_addr, uint16_t port);
|
|
||||||
void rest_api_fin(void);
|
|
||||||
|
|
||||||
|
|
||||||
/* smscb_*fsm.c */
|
|
||||||
enum smscb_fsm_event {
|
enum smscb_fsm_event {
|
||||||
SMSCB_E_CHILD_DIED,
|
SMSCB_E_CHILD_DIED,
|
||||||
/* create a message (from REST) */
|
/* create a message (from REST) */
|
|
@ -44,7 +44,7 @@
|
||||||
#include <osmocom/vty/logging.h>
|
#include <osmocom/vty/logging.h>
|
||||||
#include <osmocom/vty/misc.h>
|
#include <osmocom/vty/misc.h>
|
||||||
|
|
||||||
#include <osmocom/cbc/internal.h>
|
#include <osmocom/cbc/debug.h>
|
||||||
#include <osmocom/cbc/rest_it_op.h>
|
#include <osmocom/cbc/rest_it_op.h>
|
||||||
#include <osmocom/cbc/cbsp_server.h>
|
#include <osmocom/cbc/cbsp_server.h>
|
||||||
#include <osmocom/cbc/sbcap_server.h>
|
#include <osmocom/cbc/sbcap_server.h>
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
#include <osmocom/cbc/cbc_message.h>
|
#include <osmocom/cbc/cbc_message.h>
|
||||||
#include <osmocom/cbc/cbc_peer.h>
|
#include <osmocom/cbc/cbc_peer.h>
|
||||||
#include <osmocom/cbc/cbc_vty.h>
|
#include <osmocom/cbc/cbc_vty.h>
|
||||||
#include <osmocom/cbc/internal.h>
|
|
||||||
#include <osmocom/cbc/cbsp_server.h>
|
#include <osmocom/cbc/cbsp_server.h>
|
||||||
#include <osmocom/cbc/sbcap_server.h>
|
#include <osmocom/cbc/sbcap_server.h>
|
||||||
|
|
||||||
|
|
|
@ -27,12 +27,14 @@
|
||||||
#include <osmocom/core/socket.h>
|
#include <osmocom/core/socket.h>
|
||||||
#include <osmocom/core/msgb.h>
|
#include <osmocom/core/msgb.h>
|
||||||
#include <osmocom/core/logging.h>
|
#include <osmocom/core/logging.h>
|
||||||
|
#include <osmocom/core/fsm.h>
|
||||||
#include <osmocom/gsm/cbsp.h>
|
#include <osmocom/gsm/cbsp.h>
|
||||||
#include <osmocom/gsm/protocol/gsm_48_049.h>
|
#include <osmocom/gsm/protocol/gsm_48_049.h>
|
||||||
#include <osmocom/netif/stream.h>
|
#include <osmocom/netif/stream.h>
|
||||||
|
|
||||||
#include <osmocom/cbc/internal.h>
|
#include <osmocom/cbc/debug.h>
|
||||||
#include <osmocom/cbc/cbsp_server.h>
|
#include <osmocom/cbc/cbsp_server.h>
|
||||||
|
#include <osmocom/cbc/cbsp_server_fsm.h>
|
||||||
#include <osmocom/cbc/cbc_peer.h>
|
#include <osmocom/cbc/cbc_peer.h>
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
#include <osmocom/cbc/cbc_message.h>
|
#include <osmocom/cbc/cbc_message.h>
|
||||||
#include <osmocom/cbc/cbc_peer.h>
|
#include <osmocom/cbc/cbc_peer.h>
|
||||||
#include <osmocom/cbc/cbsp_server.h>
|
#include <osmocom/cbc/cbsp_server.h>
|
||||||
#include <osmocom/cbc/internal.h>
|
#include <osmocom/cbc/cbsp_server_fsm.h>
|
||||||
|
#include <osmocom/cbc/debug.h>
|
||||||
|
#include <osmocom/cbc/smscb_message_fsm.h>
|
||||||
|
|
||||||
#define S(x) (1 << (x))
|
#define S(x) (1 << (x))
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,9 @@
|
||||||
#include <osmocom/cbc/sbcap_server.h>
|
#include <osmocom/cbc/sbcap_server.h>
|
||||||
#include <osmocom/cbc/sbcap_msg.h>
|
#include <osmocom/cbc/sbcap_msg.h>
|
||||||
#include <osmocom/cbc/rest_it_op.h>
|
#include <osmocom/cbc/rest_it_op.h>
|
||||||
#include <osmocom/cbc/internal.h>
|
#include <osmocom/cbc/debug.h>
|
||||||
#include <osmocom/cbc/cbc_peer.h>
|
#include <osmocom/cbc/cbc_peer.h>
|
||||||
|
#include <osmocom/cbc/smscb_message_fsm.h>
|
||||||
|
|
||||||
/* convert cbc_message to osmo_cbsp_cell_list */
|
/* convert cbc_message to osmo_cbsp_cell_list */
|
||||||
static int cbcmsg_to_cbsp_cell_list(const void *ctx, struct osmo_cbsp_cell_list *list,
|
static int cbcmsg_to_cbsp_cell_list(const void *ctx, struct osmo_cbsp_cell_list *list,
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
#define PREFIX "/api/ecbe/v1"
|
#define PREFIX "/api/ecbe/v1"
|
||||||
|
|
||||||
#include <osmocom/cbc/internal.h>
|
#include <osmocom/cbc/debug.h>
|
||||||
#include <osmocom/cbc/charset.h>
|
#include <osmocom/cbc/charset.h>
|
||||||
#include <osmocom/cbc/cbc_data.h>
|
#include <osmocom/cbc/cbc_data.h>
|
||||||
#include <osmocom/cbc/rest_it_op.h>
|
#include <osmocom/cbc/rest_it_op.h>
|
||||||
|
|
|
@ -23,11 +23,13 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#include <osmocom/core/talloc.h>
|
||||||
#include <osmocom/core/linuxlist.h>
|
#include <osmocom/core/linuxlist.h>
|
||||||
#include <osmocom/core/it_q.h>
|
#include <osmocom/core/it_q.h>
|
||||||
|
|
||||||
|
#include <osmocom/cbc/cbc_data.h>
|
||||||
#include <osmocom/cbc/rest_it_op.h>
|
#include <osmocom/cbc/rest_it_op.h>
|
||||||
#include <osmocom/cbc/internal.h>
|
#include <osmocom/cbc/debug.h>
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* HTTP THREAD
|
* HTTP THREAD
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
#include <osmocom/cbc/cbc_message.h>
|
#include <osmocom/cbc/cbc_message.h>
|
||||||
#include <osmocom/cbc/sbcap_server.h>
|
#include <osmocom/cbc/sbcap_server.h>
|
||||||
#include <osmocom/cbc/internal.h>
|
#include <osmocom/cbc/debug.h>
|
||||||
|
|
||||||
/* 3GPP TS 36.413 9.2.1.53 */
|
/* 3GPP TS 36.413 9.2.1.53 */
|
||||||
#define SBCAP_WARN_MSG_CONTENTS_IE_MAX_LEN 9600
|
#define SBCAP_WARN_MSG_CONTENTS_IE_MAX_LEN 9600
|
||||||
|
|
|
@ -35,9 +35,11 @@
|
||||||
|
|
||||||
#include <osmocom/sbcap/sbcap_common.h>
|
#include <osmocom/sbcap/sbcap_common.h>
|
||||||
|
|
||||||
#include <osmocom/cbc/internal.h>
|
#include <osmocom/cbc/cbc_data.h>
|
||||||
#include <osmocom/cbc/sbcap_server.h>
|
#include <osmocom/cbc/sbcap_server.h>
|
||||||
|
#include <osmocom/cbc/sbcap_server_fsm.h>
|
||||||
#include <osmocom/cbc/cbc_peer.h>
|
#include <osmocom/cbc/cbc_peer.h>
|
||||||
|
#include <osmocom/cbc/debug.h>
|
||||||
|
|
||||||
const char *sbcap_cbc_client_name(const struct osmo_sbcap_cbc_client *client)
|
const char *sbcap_cbc_client_name(const struct osmo_sbcap_cbc_client *client)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,8 +27,10 @@
|
||||||
|
|
||||||
#include <osmocom/cbc/cbc_message.h>
|
#include <osmocom/cbc/cbc_message.h>
|
||||||
#include <osmocom/cbc/sbcap_server.h>
|
#include <osmocom/cbc/sbcap_server.h>
|
||||||
#include <osmocom/cbc/internal.h>
|
#include <osmocom/cbc/sbcap_server_fsm.h>
|
||||||
|
#include <osmocom/cbc/debug.h>
|
||||||
#include <osmocom/cbc/cbc_peer.h>
|
#include <osmocom/cbc/cbc_peer.h>
|
||||||
|
#include <osmocom/cbc/smscb_message_fsm.h>
|
||||||
|
|
||||||
#define S(x) (1 << (x))
|
#define S(x) (1 << (x))
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,9 @@
|
||||||
|
|
||||||
#include <osmocom/cbc/cbc_data.h>
|
#include <osmocom/cbc/cbc_data.h>
|
||||||
#include <osmocom/cbc/cbsp_server.h>
|
#include <osmocom/cbc/cbsp_server.h>
|
||||||
#include <osmocom/cbc/internal.h>
|
#include <osmocom/cbc/debug.h>
|
||||||
#include <osmocom/cbc/rest_it_op.h>
|
#include <osmocom/cbc/rest_it_op.h>
|
||||||
|
#include <osmocom/cbc/smscb_message_fsm.h>
|
||||||
|
|
||||||
#define S(x) (1 << (x))
|
#define S(x) (1 << (x))
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,8 @@
|
||||||
#include <osmocom/cbc/cbsp_server.h>
|
#include <osmocom/cbc/cbsp_server.h>
|
||||||
#include <osmocom/cbc/sbcap_server.h>
|
#include <osmocom/cbc/sbcap_server.h>
|
||||||
#include <osmocom/cbc/sbcap_msg.h>
|
#include <osmocom/cbc/sbcap_msg.h>
|
||||||
#include <osmocom/cbc/internal.h>
|
#include <osmocom/cbc/debug.h>
|
||||||
|
#include <osmocom/cbc/smscb_message_fsm.h>
|
||||||
|
|
||||||
#define S(x) (1 << (x))
|
#define S(x) (1 << (x))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue