qmi_decode_struct_elem(9)
π
qmi_decode_struct_elem(9) β¨
π NAME
qmi_decode_struct_elem β okay bestie, this is a Kernel API Manual page, and it's literally about decoding elements of struct data type. No cap, that's the whole vibe: struct elements go in, decoded struct elements come out. π
β¨ SYNOPSIS
int qmi_decode_struct_elem (const struct qmi_elem_info *ei_array , void
*buf_dst , const void *buf_src , u32 elem_len , u32 tlv_len , int
dec_level );
π§ ARGUMENTS
ei_arrayβ the struct-info array that describes the struct element. It's giving "map of the struct," iykyk.buf_dstβ the buffer where the decoded element gets stored. That's the destination, bestie.buf_srcβ the buffer holding the elements in QMI wire format. That's where the encoded data is chilling.elem_lenβ the number of elements to be decoded. Exactly that many, periodt.tlv_lenβ the total size of the encoded information corresponding to this struct element. It's the whole encoded package size for this one.dec_levelβ the depth of the nested structure from the main structure. Basically, how deep into the nesting we are.
πΈ DESCRIPTION
So here's the tea: this function decodes the "elem_len" number of elements in QMI wire format. Each one is "(tlv_len/elem_len)" bytes, and they get pulled from the source buffer "buf_src". Then the decoded elements are stored in the destination buffer "buf_dst". π«Ά
The elements are of struct data type, which includes any C structure. Yes, any C structure β it's versatile like that. This function returns the number of bytes of decoded information.
π RETURN
On success, you get the total size of the decoded data elements. π On error, it returns a negative errno. So if the number is negative, that's your lil red flag β not a slay.
π¦ SEE ALSO
Kernel file: ./drivers/soc/qcom/qmi_encdec.c
Also check out these icons: skip_to_next_elem(9), qmi_calc_min_msg_len(9), qmi_encode_basic_elem(9), qmi_encode_struct_elem(9), qmi_encode_string_elem(9), qmi_encode(9), qmi_decode_basic_elem(9), qmi_decode_string_elem(9), find_ei(9), qmi_decode(9), qmi_encode_message(9), qmi_decode_message(9). π
Alright bestie, that's the whole page. Source/version: ./drivers/soc/qcom β’ date: October 2026 β’ manual energy: qmi_decode_struct_elem(9) forever π
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms