所以我收到了这个警告:
initialization makes integer from pointer without a cast
在以下代码中:
void receive(u_char *args, const struct pcap_pkthdr *pkthdr, const u_char *buffer)
{
const int one = 1;
int LEN = args; /* THIS IS THE LINE */
struct ipheader *ip;
struct tcpheader *tcp;
老实说,小新手我不确定该怎么做,因为几乎所有搜索都会返回makes pointer from integer
。
我还收到了这些编译器消息:
/tmp/cci6u7NH.o: In function `main':
ChannelBunny.c:(.text+0x448): undefined reference to `pthread_create'
ChannelBunny.c:(.text+0x4b7): undefined reference to `pthread_join'
/tmp/cci6u7NH.o: In function `receive':
ChannelBunny.c:(.text+0xcb6): undefined reference to `nthol'
ChannelBunny.c:(.text+0xcdf): undefined reference to `nthol'
collect2: ld returned 1 exit status
通过使用摆脱了类似的 pcap 问题,-l pcap
但这对其他两个不起作用。它刚刚返回:
gcc: pthread: No such file or directory
gcc: nthol: No such file or director
我猜我必须下载一些东西?还是我必须使用另一个命令。(如果这对您有用,我正在使用 Backtrack5)。