想要查看一些结构体的定义,比如struct ip_mreq,可以查看头文件,所有的系统预定义的结构体都在内核源代码的/include下有定义,ubuntu里面是/usr/include 。  比如要找上面提到的struct ip_mreq,可以这样:find /usr/include -name "*.h" | xargs grep "struct ip_mreq" -rn ,结果显示,这个结构体在/usr/include/netinet/in.h 的251行有定义。   其他的情况举一反三即可。 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-22
  • 2021-10-30
  • 2021-12-11
  • 2021-10-03
  • 2021-11-10
  • 2023-02-24
  • 2021-11-11
相关资源
相似解决方案