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 to struct iscsi_iface, aka the interface you're being nosy about. Careful though: if this pointer is NULL, your program gets terminated by assert. Not a soft little error message, not a return code β€” an actual assert. πŸ’€ So fr fr, check your pointer first, don't hand it a NULL and 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