Skip to content

Instantly share code, notes, and snippets.

@kamalmarhubi
kamalmarhubi / ifconfig-annotated-strace
Last active July 28, 2020 13:55
ifconfig: how does it even?
######## start up crap ########
execve("/sbin/ifconfig", ["ifconfig"], [/* 16 vars */]) = 0
brk(0) = 0xda6000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f87bbd5d000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=106334, ...}) = 0
mmap(NULL, 106334, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f87bbd43000