previous: >>108180698
#define __NR_getsockname 51
#define __NR_getpeername 52
https://man7.org/linux/man-pages/man2/getsockname.2.html
https://man7.org/linux/man-pages/man2/getpeername.2.html
god, i am so ready to be done with sockets. no one here cares about them...
these two feel like especially useless syscalls. like sure they're handy for something, i guess, but god. just feels like a waste of space. it at least showcases C's restrict
keyword, which is pretty cool. i like that keyword
on a tangentially related note, i have been const qualifying a lot more of my pointers recently (as in, const pointer, not pointer to const)
i basically use it in the same way that you'd use a C++ reference, where i only ever expect to be passed a pointer because someone took the address of a variable. looks breddy nice. i haven't bothered with restrict, because it seems like that would start to get too wordy, but maybe i can typedef or macro something into a ref_t, lol. could probably even add some type of static assert to ensure that it's actually an address and not a raw pointer
hardly related to sockets, i realize, but the threads keep dying early, so maybe this will help
relevant resources:
man man
man syscalls
https://man7.org/linux/man-pages/
https://linux.die.net/man/
https://elixir.bootlin.com/linux/
https://elixir.bootlin.com/musl/
https://elixir.bootlin.com/glibc/