CS144实验室,但是代码不能使 In file included from /home/wangyan/csLab/sponge/libsponge/util/tun.cc:7:struct sockaddr ifru_addr; 我尝试了其他推荐的方法,添加代码 #include <sys/socket.h
在Linux中,要创建套接字,需要包含sys/socket.h头文件并使用socket()函数。头文件位于/usr/include/sys/socket.h。extern int socket (int __domain, int __type, int __protocol) __THROW;谢谢。