Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要分析通过网络发送数据时选择传输层协议的过程的源代码。我试图找到,但我仍然没有找到它。有人可以建议我如何得到这个吗?
*至少如果我能得到也会非常有帮助的算法/伪代码。
谢谢
传输层由应用程序代码在创建套接字时选择。目前尚不清楚您所说的“过程”是什么意思。
对于初学者,尝试 grepping 字符串SOCK_STREAM、SOCK_DGRAM、AF_INET或IPPROTO_TCP的应用程序源代码。
如果您指的是 Linux 内核,请从 src/net/socket.c 开始
http://lxr.free-electrons.com/source/net/socket.c