aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmo-bts/oml.h3
-rw-r--r--src/common/msg_utils.c17
-rw-r--r--src/common/oml.c12
3 files changed, 13 insertions, 19 deletions
diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h
index d7092780..d32a5fbc 100644
--- a/include/osmo-bts/oml.h
+++ b/include/osmo-bts/oml.h
@@ -6,9 +6,6 @@ struct gsm_abis_mo;
struct msgb;
-extern const char oml_ipa_magic[13];
-extern const char oml_osmo_magic[12];
-
int oml_init(void);
int down_oml(struct gsm_bts *bts, struct msgb *msg);
diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c
index 2d5ebd9b..f3cba090 100644
--- a/src/common/msg_utils.c
+++ b/src/common/msg_utils.c
@@ -23,6 +23,7 @@
#include <osmocom/gsm/protocol/ipaccess.h>
#include <osmocom/gsm/protocol/gsm_12_21.h>
+#include <osmocom/gsm/abis_nm.h>
#include <osmocom/core/msgb.h>
#include <arpa/inet.h>
@@ -63,16 +64,16 @@ static int check_manuf(struct msgb *msg, struct abis_om_hdr *omh, size_t msg_siz
return -1;
}
- if (omh->data[0] == sizeof(oml_ipa_magic) &&
- strncmp(oml_ipa_magic, (const char *)omh->data + 1,
- sizeof(oml_ipa_magic)) == 0) {
+ if (omh->data[0] == sizeof(abis_nm_ipa_magic) &&
+ strncmp(abis_nm_ipa_magic, (const char *)omh->data + 1,
+ sizeof(abis_nm_ipa_magic)) == 0) {
type = OML_MSG_TYPE_IPA;
- size = sizeof(oml_ipa_magic) + 1;
- } else if (omh->data[0] == sizeof(oml_osmo_magic) &&
- strncmp(oml_osmo_magic, (const char *) omh->data + 1,
- sizeof(oml_osmo_magic)) == 0) {
+ size = sizeof(abis_nm_ipa_magic) + 1;
+ } else if (omh->data[0] == sizeof(abis_nm_osmo_magic) &&
+ strncmp(abis_nm_osmo_magic, (const char *) omh->data + 1,
+ sizeof(abis_nm_osmo_magic)) == 0) {
type = OML_MSG_TYPE_OSMO;
- size = sizeof(oml_osmo_magic) + 1;
+ size = sizeof(abis_nm_osmo_magic) + 1;
} else {
LOGP(DL1C, LOGL_ERROR, "Manuf Label Unknown\n");
return -1;
diff --git a/src/common/oml.c b/src/common/oml.c
index 2d690d63..2ea71ec5 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -91,10 +91,6 @@ static struct tlv_definition abis_nm_att_tlvdef_ipa = {
},
};
-/* ip.access nanoBTS specific commands */
-const char oml_ipa_magic[] = "com.ipaccess";
-const char oml_osmo_magic[] = "org.osmocom";
-
static int oml_ipa_set_attr(struct gsm_bts *bts, struct msgb *msg);
/*
@@ -167,9 +163,9 @@ int oml_send_msg(struct msgb *msg, int is_manuf)
if (is_manuf) {
/* length byte, string + 0 termination */
- uint8_t *manuf = msgb_push(msg, 1 + sizeof(oml_ipa_magic));
- manuf[0] = strlen(oml_ipa_magic)+1;
- memcpy(manuf+1, oml_ipa_magic, strlen(oml_ipa_magic));
+ uint8_t *manuf = msgb_push(msg, 1 + sizeof(abis_nm_ipa_magic));
+ manuf[0] = strlen(abis_nm_ipa_magic)+1;
+ memcpy(manuf+1, abis_nm_ipa_magic, strlen(abis_nm_ipa_magic));
}
/* Push the main OML header and send it off */
@@ -1050,7 +1046,7 @@ static int down_mom(struct gsm_bts *bts, struct msgb *msg)
return -EIO;
}
- if (strncmp((char *)&oh->data[1], oml_ipa_magic, idstrlen)) {
+ if (strncmp((char *)&oh->data[1], abis_nm_ipa_magic, idstrlen)) {
LOGP(DOML, LOGL_ERROR, "Manufacturer OML message != ipaccess not supported\n");
return -EINVAL;
}