#include "pcap.h"
#include "stdlib.h"
/* prototype of the packet handler */
void packet_handler();
int main()
{
pcap_if_t *alldevs;
pcap_if_t *d;
int inum;
int i=0;
pcap_t *adhandle;
char errbuf[PCAP_ERRBUF_SIZE];
/* Retrieve the device list */
if() == -1)
{
fprintf();
exit();
}
/* Print the list */
for()
{
printf();
if ()
printf()\n", d->description);
else
printf()\n");
}
if()
{
printf();
return -1;
}
printf():",i);
scanf();
if()
{
printf();
/* Free the device list */
pcap_freealldevs();
return -1;
}
/* Jump to the selected adapter */
for();
/* Open the device */
/* Open the adapter */
if ((adhandle= pcap_open_live(d->name, // name of the device
65536, // portion of the packet to capture.
// 65536 grants that the whole packet will be captured on all the MACs.
1, // promiscuous mode ()
1000, // read timeout
errbuf // error buffer
)) == NULL)
{
fprintf();
/* Free the device list */
pcap_freealldevs();
return -1;
}
printf();
/* At this point, we don't need any more the device list. Free it */
pcap_freealldevs();
/* start the capture */
pcap_loop();
pcap_close();
return 0;
}
/* Callback function invoked by libpcap for every incoming packet */
void packet_handler()
{
struct tm *ltime;
char timestr[16];
time_t local_tv_sec;
/*
* unused parameters
*/
()();
()();
/* convert the timestamp to readable format */
local_tv_sec = header->ts.tv_sec;
ltime=localtime();
strftime();
printf();
}
Any help on how to correct the error would be appreciated
that is a source code of a file called basic_dump.c ,among other files, that should be compiled to get the executable file . I used the cat command of Linux to get its content . However when I try to compile them using the make command , I get the error above and I think it comes from that file .