diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-04-27 18:14:14 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-04-29 13:10:37 +0200 |
commit | 564c06525b9acb3f4b90d4c92970e7d9cc5b1d8e (patch) | |
tree | 415c88dfac2c692f548e50ab32830f2ba9b5ab68 /openbsc/src | |
parent | 31760a1f6089fb59475ba79faa3eb97e4cf00f68 (diff) |
OAP: use osmo_oap_ prefix for OAP, rather than plain oap_
this is in preparation of moving related code to libosmocore.
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/gprs/oap.c | 14 | ||||
-rw-r--r-- | openbsc/src/gprs/oap_messages.c | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/openbsc/src/gprs/oap.c b/openbsc/src/gprs/oap.c index eb0dd19d1..0b8f48260 100644 --- a/openbsc/src/gprs/oap.c +++ b/openbsc/src/gprs/oap.c @@ -119,11 +119,11 @@ static int oap_evaluate_challenge(const struct oap_state *state, return 0; } -struct msgb *oap_encoded(const struct oap_message *oap_msg) +struct msgb *oap_encoded(const struct osmo_oap_message *oap_msg) { struct msgb *msg = msgb_alloc_headroom(1000, 64, __func__); OSMO_ASSERT(msg); - oap_encode(msg, oap_msg); + osmo_oap_encode(msg, oap_msg); return msg; } @@ -136,7 +136,7 @@ static struct msgb* oap_msg_register(uint16_t client_id) return NULL; } - struct oap_message oap_msg = {0}; + struct osmo_oap_message oap_msg = {0}; oap_msg.message_type = OAP_MSGT_REGISTER_REQUEST; oap_msg.client_id = client_id; return oap_encoded(&oap_msg); @@ -157,7 +157,7 @@ int oap_register(struct oap_state *state, struct msgb **msg_tx) * On error, return NULL. */ static struct msgb* oap_msg_challenge_response(uint8_t *xres) { - struct oap_message oap_reply = {0}; + struct osmo_oap_message oap_reply = {0}; oap_reply.message_type = OAP_MSGT_CHALLENGE_RESULT; memcpy(oap_reply.xres, xres, sizeof(oap_reply.xres)); @@ -166,7 +166,7 @@ static struct msgb* oap_msg_challenge_response(uint8_t *xres) } static int handle_challenge(struct oap_state *state, - struct oap_message *oap_rx, + struct osmo_oap_message *oap_rx, struct msgb **msg_tx) { int rc; @@ -209,11 +209,11 @@ int oap_handle(struct oap_state *state, const struct msgb *msg_rx, struct msgb * size_t data_len = msgb_l2len(msg_rx); int rc = 0; - struct oap_message oap_msg = {0}; + struct osmo_oap_message oap_msg = {0}; OSMO_ASSERT(data); - rc = oap_decode(data, data_len, &oap_msg); + rc = osmo_oap_decode(data, data_len, &oap_msg); if (rc < 0) { LOGP(DGPRS, LOGL_ERROR, "Decoding OAP message failed with error '%s' (%d)\n", diff --git a/openbsc/src/gprs/oap_messages.c b/openbsc/src/gprs/oap_messages.c index ccb3c81a2..53ea9ac84 100644 --- a/openbsc/src/gprs/oap_messages.c +++ b/openbsc/src/gprs/oap_messages.c @@ -31,8 +31,8 @@ #include <stdint.h> -int oap_decode(const uint8_t *const_data, size_t data_len, - struct oap_message *oap_msg) +int osmo_oap_decode(const uint8_t *const_data, size_t data_len, + struct osmo_oap_message *oap_msg) { int rc; uint8_t tag; @@ -144,7 +144,7 @@ int oap_decode(const uint8_t *const_data, size_t data_len, return 0; } -void oap_encode(struct msgb *msg, const struct oap_message *oap_msg) +void osmo_oap_encode(struct msgb *msg, const struct osmo_oap_message *oap_msg) { uint8_t u8; |