What Linux library supports sockets, ioctl calls, tuntap, etc...?
What is t开发者_开发知识库he name of the runtime library which implements Linux network interfaces, like sockets, tuntaps, netlink, etc...? For example when I create an UDP socket and make an ioctl call to fetch network interface info, which library actually implements that call? What are the corresponding *.so files on most linux dstirbutions?
These are c library calls, and as such are in the libc library.
The C library exports the functions, but they are just wrappers for sys calls. The actual socket functions themselves are implemented inside the kernel.
So pull it to pieces starting with sys_socket - it's not that difficult, and LXR makes it easy.
They're not all in libc, although many are. Tun/Tap has its own library, so does netlink. Basic socket operations are in libc.
精彩评论