mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +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
|
@ -1351,7 +1351,7 @@ syscon iff IFF_ALLMULTI 0x0200 0x0200 0x0200 0x0200 0x0200 0x0200
|
|||
syscon iff IFF_NOARP 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80 # faked nt as linux; unix consensus
|
||||
syscon iff IFF_POINTOPOINT 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x10 # point-to-point; faked nt as linux; unix consensus
|
||||
syscon iff IFF_PROMISC 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0 # in packet capture mode; unix consensus
|
||||
syscon iff IFF_RUNNING 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0 # unix consensus
|
||||
syscon iff IFF_RUNNING 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0 # unix consensus (mostly for bsd compatibility?)
|
||||
syscon iff IFF_NOTRAILERS 0x20 0x20 0x20 0x20 0 0 0 0
|
||||
syscon iff IFF_AUTOMEDIA 0x4000 0x4000 0 0 0 0 0 0
|
||||
syscon iff IFF_DYNAMIC 0x8000 0x8000 0 0 0 0 0 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue