blob: 24ec63e250f34ba471ff6c90d19a907765ef43ec [file] [log] [blame]
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +02001#ifndef _INTERNAL_H_
2#define _INTERNAL_H_
3
Pablo Neira Ayuso54b49792011-06-07 12:15:26 +02004/* talloc context for libosmo-abis. */
5extern void *libosmo_abis_ctx;
6
7/* use libosmo_abis_init, this is only for internal use. */
8void e1inp_init(void);
9
Pablo Neira Ayuso0ba77d52011-06-05 18:32:44 +020010/* things I don't know what to do with yet. */
11
12/* extracted from include/openbsc/debug.h. */
13#define BSC_CTX_BTS 2
14
15/* from include/openbsc/signal.h, we need SS_INPUT and S_GLOBAL_SHUTDOWN. */
16enum signal_subsystems {
17 SS_PAGING,
18 SS_SMS,
19 SS_ABISIP,
20 SS_NM,
21 SS_LCHAN,
22 SS_SUBSCR,
23 SS_SCALL,
24 SS_GLOBAL,
25 SS_CHALLOC,
26 SS_NS,
27 SS_IPAC_NWL,
28 SS_RF,
29 SS_MSC,
30 SS_HO,
31 SS_INPUT,
32};
33
34enum signal_global {
35 S_GLOBAL_SHUTDOWN,
36 S_GLOBAL_BTS_CLOSE_OM,
37};
38
39/* from include/openbsc/vty.h, we need E1INP_NODE */
40#include <osmocom/vty/vty.h>
41#include <osmocom/vty/buffer.h>
42#include <osmocom/vty/command.h>
43
44enum bsc_vty_node {
45 GSMNET_NODE = _LAST_OSMOVTY_NODE + 1,
46 BTS_NODE,
47 TRX_NODE,
48 TS_NODE,
49 SUBSCR_NODE,
50 MGCP_NODE,
51 GBPROXY_NODE,
52 SGSN_NODE,
53 NS_NODE,
54 BSSGP_NODE,
55 OML_NODE,
56 E1INP_NODE,
57 NAT_NODE,
58 NAT_BSC_NODE,
59 MSC_NODE,
60 OM2K_NODE,
61 TRUNK_NODE,
62 PGROUP_NODE,
63};
64
65/* from include/openbsc/debug.h */
66enum {
67 DRLL,
68 DCC,
69 DMM,
70 DRR,
71 DRSL,
72 DNM,
73 DMNCC,
74 DSMS,
75 DPAG,
76 DMEAS,
77 DMI,
78 DMIB,
79 DMUX,
80 DINP,
81 DSCCP,
82 DMSC,
83 DMGCP,
84 DHO,
85 DDB,
86 DREF,
87 DGPRS,
88 DNS,
89 DBSSGP,
90 DLLC,
91 DSNDCP,
92 DNAT,
93 Debug_LastEntry,
94};
95
96struct osmo_fd;
97struct msgb *ipaccess_read_msg(struct osmo_fd *bfd, int *error);
98void ipaccess_prepend_header(struct msgb *msg, int proto);
99
100#include <stdint.h>
101
102int make_sock(struct osmo_fd *bfd, int proto,
103 uint32_t ip, uint16_t port, int priv_nr,
104 int (*cb)(struct osmo_fd *fd, unsigned int what), void *data);
105
106uint8_t *trau_idle_frame(void);
107
108#endif