Function ndpi_memmem
- Defined in File ndpi_api.h 
Function Documentation
- 
void *ndpi_memmem(const void *haystack, size_t haystack_len, const void *needle, size_t needle_len)
- Finds the first occurrence of the sequence - needlein the array- haystack.- This function searches for the first occurrence of the sequence - needleof length- needle_lenin the array- haystackof length- haystack_len. If- haystackor- needleis- NULL, or- haystack_lenis less than- needle_len, or- needle_lenis 0, the function returns- NULL.- For optimization, if - needle_lenis 1, the- memchrfunction is used.- Parameters:
- haystack – Pointer to the array in which the search is performed. 
- haystack_len – Length of the - haystackarray.
- needle – Pointer to the array to be searched for in - haystack.
- needle_len – Length of the - needlearray.
 
- Returns:
- Pointer to the first occurrence of - needlein- haystackor- NULLif- needleis not found.