lsm_target_port_list(3)
π lsm_target_port_list π
okay bestie, welcome to the Libstoragemgmt C API Manual β¨ this one's about lsm_target_port_list(3) and it's genuinely so good, we're just gonna get into it π«Ά
β¨ NAME β¨
lsm_target_port_list β gets a list of target ports on this connection. that's it, that's the job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
int lsm_target_port_list (lsm_connect *conn, const char *search_key,
const char *search_value, lsm_target_port **target_ports[], uint32_t
*count, lsm_flag flags);
like. look at her. six arguments, zero notes. icon behavior π
π ARGUMENTS π
connβ a valid connection. no connection, no vibes, no list. sorry bestie πsearch_keyβ the search key, orNULLif you want literally everything. the valid search keys are:"id"and"system_id". that's the whole menu, don't go inventing new ones πsearch_valueβ the search value. the thing you're searching for. matching the key. yeah πtarget_ports[]β output pointer to anlsm_target_portarray. important: the return value must be freed with a call tolsm_target_port_record_array_free. not optional. free your memory, bestie, it's self care π§countβ output pointer ofuint32_t. this is how many target ports you got back. the number. the tally πflagsβ reserved for future use, must beLSM_CLIENT_FLAG_RSVD. put anything else and the vibe check fails π
π¦ VERSION π¦
1.0 β¨ baby's first release and she's already perfect
π DESCRIPTION π
okay so here's the tea: this function gets a list of target ports on this connection. π«
and what even is a target port, you ask? bestie, a target port is the front-end port of the storage system which the storage user/client connects to and gets storage service from. that's the whole thing. she's the door, you're the guest, she hands you storage. iconic β¨
and once you've got your ports, you can pull all their properties with these functions:
lsm_target_port_id_getlsm_target_port_type_getlsm_target_port_system_id_getlsm_target_port_network_address_getlsm_target_port_physical_address_getlsm_target_port_physical_name_getlsm_target_port_service_address_get
seven little getters, all lined up, all serving looks π
π« CAPABILITY π«
LSM_CAP_TARGET_PORTS
(you need this capability for the function to be supported. check it first, bestie, don't just roll up uninvited π)
π₯ RETURN π₯
returns an error code as enumerated by lsm_error_number:
LSM_ERR_OKβ on success, or when the searched value isn't found. either way she's chill, no drama πΈLSM_ERR_INVALID_ARGUMENTβ when any argument isNULL, or the flags are invalid, or the search key is invalid. she will not be accepting that energy πLSM_ERR_NO_SUPPORTβ not supported. it's giving "not my department" π
reminder bestie: thattarget_ports[]array does NOT free itself. calllsm_target_port_record_array_free. i'm not gonna say it again. (i will say it again.) π«Ά
and that's the whole page!! this was the lsm_target_port_list manual, part of the Libstoragemgmt C API Manual, last updated February 2026, and honestly? she ate. go free your arrays. mwah ππ
β¨π¦π
π¦ where this page comes from
- fedora 43: libstoragemgmt-devel 1.10.3-1.fc43 Β· LGPL-2.1-or-later
- fedora 44: libstoragemgmt-devel 1.10.3-1.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms