diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-02-13 22:23:13 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-05-19 07:33:32 +0000 |
commit | 8006f5393e21750558a01c780641831d925382ee (patch) | |
tree | 7cb67ca98a93395015075d540613dcc46a356e9e /src/gsm/libosmogsm.map | |
parent | e0c5d700ae4289cf1f4f5fae1d061b666387cb3d (diff) |
TLV: Add one-shot TLV encoder
So far, the TLV code contained two types of functions
* tlp_parse() to parse all TLVs according to definition into tlvp_parsed
* various helper functions to encode individual TLVs during message
generation
This patch implements the inverse of tlv_parse(): tlv_encode(), which
takes a full 'struct tlv_pared' and encodes all IEs found in it. The
order of IEs is in numerically ascending order of the tag.
As many protocols have different IE/TLV ordering requirements, let's add
a tlv_encode_ordered() function where the caller can specify the TLV
ordering during the one-shot encode.
Change-Id: I761a30bf20355a9f80a4a8e0c60b0b0f78515efe
Diffstat (limited to 'src/gsm/libosmogsm.map')
-rw-r--r-- | src/gsm/libosmogsm.map | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 0f4a0db1..299504e8 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -537,6 +537,9 @@ tlv_dump; tlv_parse; tlv_parse2; tlv_parse_one; +tlv_encode; +tlv_encode_ordered; +tlv_encode_one; tvlv_att_def; vtvlv_gan_att_def; |