当前位置: 技术问答>linux和unix
获取linux链路层数据
来源: 互联网 发布时间:2017-04-16
本文导语: int main() { int sockfd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_IP)); if (sockfd
int main()
{
int sockfd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_IP));
if (sockfd
{
int sockfd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_IP));
if (sockfd