/* * API compat layer * written by Jan Engelhardt, 2008 - 2010 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, either * version 2 of the License, or any later version. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "compat_skbuff.h" #include "compat_xtnu.h" #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) # define WITH_IPV6 1 #endif void *HX_memmem(const void *space, size_t spacesize, const void *point, size_t pointsize) { size_t i; if (pointsize > spacesize) return NULL; for (i = 0; i <= spacesize - pointsize; ++i) if (memcmp(space + i, point, pointsize) == 0) return (void *)space + i; return NULL; } EXPORT_SYMBOL_GPL(HX_memmem); MODULE_LICENSE("GPL");