3

pcap_open_live returns NULL

view full story
linux-howto

http://www.linuxforums.org – Code: const u_char* ProjectSniffer::GetPacket(char *Dev) {     pcap_t *handle;                // Session handler     struct pcap_pkthdr header;      // Header (von pcap vordefiniert)     char errbuf[PCAP_ERRBUF_SIZE];  // Fehlerausgabe     const u_char *packet;          // Das aktuelle Paket     handle = pcap_open_live(Dev, BUFSIZ, 0, 0, errbuf);     if (handle==NULL)     {         return NULL;     }     // Packet Sniffen     packet = pcap_next(handle, &header);     return packet; } It's In a Qt Program, it runs fine in a C Programm (HowTos)