qmi_decode_struct_elem(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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