diff options
| author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-08-03 05:44:00 +0700 | 
|---|---|---|
| committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-08-05 23:21:43 +0700 | 
| commit | 30cfeeb4a0a3992b55a48c3ccefc91f727ef079e (patch) | |
| tree | c472c5ebf8f720228175c3a606de24992c1780f5 /include | |
| parent | 39a36d01932867f780474f4b17bf42224cd57edb (diff) | |
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
Diffstat (limited to 'include')
| -rw-r--r-- | include/osmocom/gsm/gsm0480.h | 3 | ||||
| -rw-r--r-- | include/osmocom/gsm/gsm48.h | 8 | 
2 files changed, 8 insertions, 3 deletions
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 <stdbool.h> +#include <osmocom/core/msgb.h> +  #include <osmocom/gsm/tlv.h>  #include <osmocom/gsm/protocol/gsm_04_08.h>  #include <osmocom/gsm/gsm48_ie.h> @@ -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)  | 
