2011-10-09 46 views

回答

2

当然,你可以得到内核源代码的套接字API,只需下载任何开源UNIX或类似UNIX的内核:LinuxFreeBSDBuilding and Installing a Custom Kernel),OpenBSDBuilding the System from Source),NetBSDNetBSD Documentation: Kernel)和可能其他。

+0

嘿,我搜查了很多...但是,我无法找到它。你能帮我吗... – Invictus

+1

对不起,这会花费我太多的时间。但我可以告诉你,在所有这些内核中,Berkeley套接字的实现遍布在几个文件中。理解这些实现是一项非常繁重的任务。如果你只想获得关于如何使用API​​的理解,你最好拿一本像Marc J. Rochkind的[Advanded Unix Programming](http://basepath.com/aup/)这样的书。如果你想重新实现它,可以先阅读[POSIX标准](http://pubs.opengroup.org/onlinepubs/9699919799/functions/contents.html)。 – DarkDust

相关问题