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