socket_local4(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

🌸 NAME 🌸

okay so bestie, this is socket_local4(3) from the Library Functions Manual πŸ’– and it's literally the "get local IP address of socket" girlie. no cap.

socket_local4 β€” get local IP address of socket ✨

πŸ¦‹ SYNTAX πŸ¦‹

#include <libowfat/socket.h>

int socket_local4(int s,char ip[4],uint16 *port);

πŸŽ€ DESCRIPTION πŸŽ€

socket_local4 returns the local IP address and port for the UDP or TCP socket s and writes the IP address to ip and the port to port. it's giving "where am I actually coming from?" energy and honestly same 🫢

If something goes wrong, socket_local4 returns -1, setting errno appropriately. so if it flops, the error tea is in errno, periodt 😭

🌈 SEE ALSO 🌈


mwah πŸ’‹ that's the whole page β€” socket_local4(3), Library Functions Manual. stay local, stay iconic, bestie πŸ’…πŸ¦‹