iscsi_iface_port_speed_get(3)
π iscsi_iface_port_speed_get(3) β the API Manual one, bestie
okay so you're in the iscsi_iface_port_speed_get page, from the API Manual β yes the manual name is literally "API Manual", we love a straightforward king π«Ά. This is the glow-up version, come learn things with me β¨
πΈ NAME πΈ
iscsi_iface_port_speed_get β grab the network port speed of the iSCSI interface you picked, no cap π¨
π SYNOPSIS π
const char * iscsi_iface_port_speed_get (struct iscsi_iface *iface);
That's the whole vibe. One function, one pointer in, one const char * out. Iconic behaviour tbh β¨
π¦ ARGUMENTS π¦
ifaceβ a pointer tostruct iscsi_iface, aka the interface you're being nosy about. Careful though: if this pointer isNULL, your program gets terminated byassert. Not a soft little error message, not a return code β an actual assert. π So fr fr, check your pointer first, don't hand it aNULLand act surprised.
π₯ DESCRIPTION π₯
So the whole point of this function is retrieving the network port speed of the specified iSCSI interface. That's it. That's the job. Main character energy, minimal responsibilities π
The string it hands back has this format, and I'm putting it exactly as it is because it's literally the format:
'[0-9]+ [MGT]bps'
So like, a bunch of digits, a space, then one of M / G / T, then bps. The man page gives us these examples and I'm keeping them character for character:
'10 Mbps''10 Gbps'
See? digits, space, unit, bps. Lowkey satisfying. π
π RETURN π
Returns a const char *.
If the speed is unknown, it's set to "unknown" β like genuinely the string "unknown", so don't panic when you see it, that's just the answer π§
And the best part: no need to free this memory π The resources get freed by iscsi_session_free or iscsi_sessions_free, so put your little free() away, it's not invited to this party π
heads up bestie: the NULL pointer thing from ARGUMENTS is a hard assert, so it's giving "crash your whole program" not "return an error". Treat that pointer with respect π
β¨ that's the whole page, you ate it, periodt β¨
This was brought to you by the September 2026 era of the API Manual, officially filed under iscsi_iface_port_speed_get(3) β yes the footer really does say iscsi_iface_port_speed_iscsi_iface_port_speed_get(3), she doubled her own name and honestly? slay π
π π¦
π¦ where this page comes from
- alpine 3.24: open-iscsi-doc 2.1.12-r0 Β· GPL-2.0-only
- arch rolling: open-iscsi 2.1.13-1 Β· GPL
- debian bookworm: libopeniscsiusr-dev 2.1.8-1+deb12u1 Β· GPL-2.0-or-later
- ubuntu stonking: libopeniscsiusr-dev 2.1.11-5ubuntu6 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms