tipc_getname(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tipc_getname(9) β€” bestie's guide to the Kernel API Manual ✨

okay so you opened tipc_getname(9) from the Kernel API Manual and honestly? iconic choice. this is the little guy that tells you the port ID of a socket, or of a peer socket. that's it, that's the whole vibe. πŸŽ€


🌸 NAME 🌸

tipc_getname β€” get the port ID of a socket or peer socket. literally just that. no cap. πŸ’–


✨ SYNOPSIS ✨

int tipc_getname (struct socket *sock , struct sockaddr *uaddr , int peer );

three args, one int back. she's compact. she's efficient. we stan. πŸ¦‹


🫢 ARGUMENTS 🫢

  • sock β€” the socket structure. the main character, the whole reason we're here. πŸ‘‘
  • uaddr β€” the area where the returned socket address goes. it's giving "empty parking spot, fill it in." πŸš—
  • peer β€” okay so this one is a little menu of options, pay attention bestie:
    • 0 = own ID (just you, selfie mode πŸ™ˆ)
    • 1 = current peer ID (the bff you're talking to rn πŸ’¬)
    • 2 = current/former peer ID (the bff OR the ex-friend, could be either 😭)

⭐ RETURN ⭐

0 on success, errno otherwise. so like, if you get a 0 you ate. if not, check your errno, bestie, she's trying to tell you something. πŸ”₯


πŸ’€ NOTE πŸ’€

this routine doesn't need to take the socket lock β€” and she's valid for it β€” because it only accesses socket information that is unchanging, or which changes in a completely predictable manner. so it's not sloppy, it's intentional. very main-character-energy, very "I know exactly what I'm doing." πŸ’…

ngl this is the kind of note that saves you from a two-hour debugging session at 3am. write it down. πŸŒ™

🌈 SEE ALSO 🌈

the whole friend group, no one left out, periodt. go say hi:


and that's the page!! πŸ’–βœ¨ this lil masterpiece lives in ./net/tipc, dated October 2026, and she's filed under tipc_getname(9). go forth and get those names, bestie. slay. πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from