Cast pkt_data to (const char *)
strncmp returns 0 upon match... Hmm.. I see a bug in my code now. Re-write compare statement as:
Code:if (header->caplen >= searchStrLen && strncmp((const char *)pkt_data, searchStr, searchStrLen) == 0) { // got a match... do something }




Reply With Quote