mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-03 11:12:27 +00:00
Introduce getifaddrs()
This function was invented by the BSDs (it's not in POSIX.1). It provides a high-level interface into ioctl(SIOCGIFCONF) which is comparatively clumsy to use. We already made the ioctls portable across our entire support vector back in 2021, so this interface is portable too. See o//tool/viz/getifaddrs.com for our demo app
This commit is contained in:
parent
6ca5ab4680
commit
024be3b009
5 changed files with 260 additions and 1 deletions
4
libc/isystem/ifaddrs.h
Normal file
4
libc/isystem/ifaddrs.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifndef _IFADDRS_H
|
||||
#define _IFADDRS_H
|
||||
#include "libc/sock/ifaddrs.h"
|
||||
#endif /* _IFADDRS_H */
|
Loading…
Add table
Add a link
Reference in a new issue