PcapPlusPlus  20.08
GeneralUtils.h
Go to the documentation of this file.
1 #ifndef PCAPPP_GENERAL_UTILS
2 #define PCAPPP_GENERAL_UTILS
3 
4 #include <string>
5 #include <stdint.h>
6 
8 
13 namespace pcpp
14 {
26  std::string byteArrayToHexString(const uint8_t* byteArr, size_t byteArrSize, int stringSizeLimit = -1);
27 
41  size_t hexStringToByteArray(const std::string& hexString, uint8_t* resultByteArr, size_t resultByteArrSize);
42 
51  char* cross_platform_memmem(const char* haystack, size_t haystackLen, const char* needle, size_t needleLen);
52 }
53 
54 #endif // PCAPPP_GENERAL_UTILS
The main namespace for the PcapPlusPlus lib.
size_t hexStringToByteArray(const std::string &hexString, uint8_t *resultByteArr, size_t resultByteArrSize)
std::string byteArrayToHexString(const uint8_t *byteArr, size_t byteArrSize, int stringSizeLimit=-1)
char * cross_platform_memmem(const char *haystack, size_t haystackLen, const char *needle, size_t needleLen)