From 30cfeeb4a0a3992b55a48c3ccefc91f727ef079e Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 3 Aug 2018 05:44:00 +0700 Subject: libosmogsm: (re)introduce gsm48_push_l3hdr() There was gsm0480_l3hdr_push() declared in a header file, but not exposed in 'libosmogsm.map'. Furthermore, for some reason it was a part of GSM 04.80 API, what is not actually correct. Let's rename this symbol, and properly expose it as a part of the GSM 04.08 API. Also, let's introduce an auxiliary wrapper for messages, where the transaction identifier is required (see GSM 04.07, section 11.2.3.1.2). Change-Id: I8a045efe8335d83fcbe8d43eb180972e3b1d9dda --- include/osmocom/gsm/gsm0480.h | 3 --- include/osmocom/gsm/gsm48.h | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'include/osmocom') diff --git a/include/osmocom/gsm/gsm0480.h b/include/osmocom/gsm/gsm0480.h index 246f4b3b..827464e1 100644 --- a/include/osmocom/gsm/gsm0480.h +++ b/include/osmocom/gsm/gsm0480.h @@ -121,6 +121,3 @@ struct msgb *gsm0480_create_ussd_release_complete(void); int gsm0480_wrap_invoke(struct msgb *msg, int op, int link_id); int gsm0480_wrap_facility(struct msgb *msg); - -struct gsm48_hdr *gsm0480_l3hdr_push(struct msgb *msg, uint8_t proto_discr, - uint8_t msg_type); diff --git a/include/osmocom/gsm/gsm48.h b/include/osmocom/gsm/gsm48.h index cfae83da..2b14e6cd 100644 --- a/include/osmocom/gsm/gsm48.h +++ b/include/osmocom/gsm/gsm48.h @@ -4,6 +4,8 @@ #include +#include + #include #include #include @@ -63,3 +65,9 @@ void gsm48_mcc_mnc_to_bcd(uint8_t *bcd_dst, uint16_t mcc, uint16_t mnc) OSMO_DEPRECATED("Use osmo_plmn_to_bcd() instead, to not lose leading zeros in the MNC"); void gsm48_mcc_mnc_from_bcd(uint8_t *bcd_src, uint16_t *mcc, uint16_t *mnc) OSMO_DEPRECATED("Use osmo_plmn_from_bcd() instead, to not lose leading zeros in the MNC"); + +struct gsm48_hdr *gsm48_push_l3hdr(struct msgb *msg, + uint8_t pdisc, uint8_t msg_type); + +#define gsm48_push_l3hdr_tid(msg, pdisc, tid, msg_type) \ + gsm48_push_l3hdr(msg, (pdisc & 0x0f) | (tid << 4), msg_type) -- cgit v1.2.3