Pablo Neira Ayuso | 0ba77d5 | 2011-06-05 18:32:44 +0200 | [diff] [blame] | 1 | #ifndef _INTERNAL_H_ |
| 2 | #define _INTERNAL_H_ |
| 3 | |
Pablo Neira Ayuso | 54b4979 | 2011-06-07 12:15:26 +0200 | [diff] [blame^] | 4 | /* talloc context for libosmo-abis. */ |
| 5 | extern void *libosmo_abis_ctx; |
| 6 | |
| 7 | /* use libosmo_abis_init, this is only for internal use. */ |
| 8 | void e1inp_init(void); |
| 9 | |
Pablo Neira Ayuso | 0ba77d5 | 2011-06-05 18:32:44 +0200 | [diff] [blame] | 10 | /* 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. */ |
| 16 | enum 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 | |
| 34 | enum 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 | |
| 44 | enum 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 */ |
| 66 | enum { |
| 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 | |
| 96 | struct osmo_fd; |
| 97 | struct msgb *ipaccess_read_msg(struct osmo_fd *bfd, int *error); |
| 98 | void ipaccess_prepend_header(struct msgb *msg, int proto); |
| 99 | |
| 100 | #include <stdint.h> |
| 101 | |
| 102 | int 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 | |
| 106 | uint8_t *trau_idle_frame(void); |
| 107 | |
| 108 | #endif |