mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Add ioctl(SIOCGIFxxx) support (#197)
- SIOCGIFCONFIG: reads and enumerate all the network interfaces - SIOCGIFADDR: reads network address for a given interface - SIOCGIFFLAGS: reads network flags for a given interface - SIOCGIFNETMASK: reads network netmask for a given interface - SIOCGIFBRDADDR: reads network broadcast address for a given interface - SIOCGIFDSTADDR: reads peer destination address for a given interface (not supported for Windows) This change defines Linux ABI structs for the above interfaces and adds polyfills to ensure they behave consistently on XNU and Windows.
This commit is contained in:
parent
4d8f884e76
commit
fd0eefce17
105 changed files with 1531 additions and 4 deletions
15
libc/nt/iphlpapi/FlushIpNetTable.s
Normal file
15
libc/nt/iphlpapi/FlushIpNetTable.s
Normal file
|
@ -0,0 +1,15 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp iphlpapi,__imp_FlushIpNetTable,FlushIpNetTable,0
|
||||
|
||||
.text.windows
|
||||
FlushIpNetTable:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_FlushIpNetTable(%rip)
|
||||
leave
|
||||
ret
|
||||
.endfn FlushIpNetTable,globl
|
||||
.previous
|
Loading…
Add table
Add a link
Reference in a new issue