mirror of https://gerrit.osmocom.org/libosmocore
make sure we don't have namespace clashes between libraries and apps
* All loging prefixes in libraries should be DL like DLINP * All signals / subsystems should be called S_L_* SS_L_* * All command nodes should be called L_*_NODE This makes sure existinc code still compiles as expected
This commit is contained in:
parent
c5a0ded53f
commit
892e621fec
|
@ -39,12 +39,12 @@ void logp(int subsys, char *file, int line, int cont, const char *format, ...) _
|
||||||
/* logging levels defined by the library itself */
|
/* logging levels defined by the library itself */
|
||||||
#define DLGLOBAL -1
|
#define DLGLOBAL -1
|
||||||
#define DLLAPDM -2
|
#define DLLAPDM -2
|
||||||
#define DINP -3
|
#define DLINP -3
|
||||||
#define DMUX -4
|
#define DLMUX -4
|
||||||
#define DMI -5
|
#define DLMI -5
|
||||||
#define DMIB -6
|
#define DLMIB -6
|
||||||
#define DRSL -7
|
#define DLRSL -7
|
||||||
#define DNM -8
|
#define DLNM -8
|
||||||
#define OSMO_NUM_DLIB 9
|
#define OSMO_NUM_DLIB 9
|
||||||
|
|
||||||
struct log_category {
|
struct log_category {
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
|
|
||||||
/* signal subsystems. */
|
/* signal subsystems. */
|
||||||
enum {
|
enum {
|
||||||
SS_GLOBAL = OSMO_SIGNAL_SS_RESERVED,
|
SS_L_GLOBAL = OSMO_SIGNAL_SS_RESERVED,
|
||||||
SS_INPUT,
|
SS_L_INPUT,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* application-defined signal types. */
|
/* application-defined signal types. */
|
||||||
|
@ -21,7 +21,7 @@ enum {
|
||||||
|
|
||||||
/* signal types. */
|
/* signal types. */
|
||||||
enum {
|
enum {
|
||||||
S_GLOBAL_SHUTDOWN = OSMO_SIGNAL_T_RESERVED,
|
S_L_GLOBAL_SHUTDOWN = OSMO_SIGNAL_T_RESERVED,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef int osmo_signal_cbfn(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data);
|
typedef int osmo_signal_cbfn(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data);
|
||||||
|
|
|
@ -74,8 +74,8 @@ enum node_type {
|
||||||
|
|
||||||
VTY_NODE, /* Vty node. */
|
VTY_NODE, /* Vty node. */
|
||||||
|
|
||||||
E1INP_NODE, /* E1 line in libosmo-abis. */
|
L_E1INP_NODE, /* E1 line in libosmo-abis. */
|
||||||
IPA_NODE, /* IPA proxying commands in libosmo-abis. */
|
L_IPA_NODE, /* IPA proxying commands in libosmo-abis. */
|
||||||
|
|
||||||
_LAST_OSMOVTY_NODE
|
_LAST_OSMOVTY_NODE
|
||||||
};
|
};
|
||||||
|
|
|
@ -72,35 +72,35 @@ static const struct log_info_cat internal_cat[OSMO_NUM_DLIB] = {
|
||||||
.loglevel = LOGL_NOTICE,
|
.loglevel = LOGL_NOTICE,
|
||||||
.enabled = 1,
|
.enabled = 1,
|
||||||
},
|
},
|
||||||
[INT2IDX(DINP)] = {
|
[INT2IDX(DLINP)] = {
|
||||||
.name = "DINP",
|
.name = "DINP",
|
||||||
.description = "A-bis Intput Subsystem",
|
.description = "A-bis Intput Subsystem",
|
||||||
.loglevel = LOGL_NOTICE,
|
.loglevel = LOGL_NOTICE,
|
||||||
.enabled = 1,
|
.enabled = 1,
|
||||||
},
|
},
|
||||||
[INT2IDX(DMUX)] = {
|
[INT2IDX(DLMUX)] = {
|
||||||
.name = "DMUX",
|
.name = "DMUX",
|
||||||
.description = "A-bis B-Subchannel TRAU Frame Multiplex",
|
.description = "A-bis B-Subchannel TRAU Frame Multiplex",
|
||||||
.loglevel = LOGL_NOTICE,
|
.loglevel = LOGL_NOTICE,
|
||||||
.enabled = 1,
|
.enabled = 1,
|
||||||
},
|
},
|
||||||
[INT2IDX(DMI)] = {
|
[INT2IDX(DLMI)] = {
|
||||||
.name = "DMI",
|
.name = "DMI",
|
||||||
.description = "A-bis Input Driver for Signalling",
|
.description = "A-bis Input Driver for Signalling",
|
||||||
.enabled = 0, .loglevel = LOGL_NOTICE,
|
.enabled = 0, .loglevel = LOGL_NOTICE,
|
||||||
},
|
},
|
||||||
[INT2IDX(DMIB)] = {
|
[INT2IDX(DLMIB)] = {
|
||||||
.name = "DMIB",
|
.name = "DMIB",
|
||||||
.description = "A-bis Input Driver for B-Channels (voice)",
|
.description = "A-bis Input Driver for B-Channels (voice)",
|
||||||
.enabled = 0, .loglevel = LOGL_NOTICE,
|
.enabled = 0, .loglevel = LOGL_NOTICE,
|
||||||
},
|
},
|
||||||
[INT2IDX(DRSL)] = {
|
[INT2IDX(DLRSL)] = {
|
||||||
.name = "DRSL",
|
.name = "DRSL",
|
||||||
.description = "A-bis Radio Siganlling Link (RSL)",
|
.description = "A-bis Radio Siganlling Link (RSL)",
|
||||||
.color = "\033[1;35m",
|
.color = "\033[1;35m",
|
||||||
.enabled = 1, .loglevel = LOGL_NOTICE,
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
||||||
},
|
},
|
||||||
[INT2IDX(DNM)] = {
|
[INT2IDX(DLNM)] = {
|
||||||
.name = "DNM",
|
.name = "DNM",
|
||||||
.description = "A-bis Network Management / O&M (NM/OML)",
|
.description = "A-bis Network Management / O&M (NM/OML)",
|
||||||
.color = "\033[1;36m",
|
.color = "\033[1;36m",
|
||||||
|
|
Loading…
Reference in New Issue