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