【发布时间】:2012-02-27 09:53:20
【问题描述】:
void parse_message(char *buffer, int len) {
struct iphrd *ip_header = (struct iphrd *)buffer;
int recv_hopcount = (unsigned int)(ip_header->ttl);
//hops[recv_hopcount]++;
}
错误:取消引用指向不完整类型的指针
我在头文件中包含了 netinet/ip.h。上面的代码是为了访问 IP 头中包含的 ttl 值而编写的。使用原始套接字。
【问题讨论】:
标签: sockets raw-sockets incomplete-type