You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.7 KiB

  1. --- a/src/codecs/ip/cd_ipv4.cc 2018-08-28 02:01:02.000000000 -0400
  2. +++ b/src/codecs/ip/cd_ipv4.cc 2020-07-04 17:45:57.125755874 -0400
  3. @@ -358,8 +358,8 @@
  4. /* Loopback traffic - don't use htonl for speed reasons -
  5. * s_addr is always in network order */
  6. #ifdef WORDS_BIGENDIAN
  7. - msb_src = (iph.ip_src >> 24);
  8. - msb_dst = (iph.ip_dst >> 24);
  9. + msb_src = ((*iph).ip_src >> 24);
  10. + msb_dst = ((*iph).ip_dst >> 24);
  11. #else
  12. msb_src = (uint8_t)(iph->ip_src & 0xff);
  13. msb_dst = (uint8_t)(iph->ip_dst & 0xff);
  14. --- a/src/network_inspectors/appid/appid_detector.h 2018-08-28 02:01:02.000000000 -0400
  15. +++ b/src/network_inspectors/appid/appid_detector.h 2020-07-04 18:07:24.196714422 -0400
  16. @@ -52,6 +52,27 @@
  17. DETECTOR_TYPE_NOT_SET
  18. };
  19. +#define BYTE_SWAP_16(x) \
  20. + ((uint16_t)((((uint16_t)(x) & 0xff00) >> 8) | \
  21. + (((uint16_t)(x) & 0x00ff) << 8)))
  22. +
  23. +#define BYTE_SWAP_32(x) \
  24. + ((uint32_t)((((uint32_t)(x) & 0xff000000) >> 24) | \
  25. + (((uint32_t)(x) & 0x00ff0000) >> 8) | \
  26. + (((uint32_t)(x) & 0x0000ff00) << 8) | \
  27. + (((uint32_t)(x) & 0x000000ff) << 24)))
  28. +
  29. +#define BYTE_SWAP_64(x) \
  30. + ((uint64_t)((((uint64_t)(x) & 0xff00000000000000ULL) >> 56) | \
  31. + (((uint64_t)(x) & 0x00ff000000000000ULL) >> 40) | \
  32. + (((uint64_t)(x) & 0x0000ff0000000000ULL) >> 24) | \
  33. + (((uint64_t)(x) & 0x000000ff00000000ULL) >> 8) | \
  34. + (((uint64_t)(x) & 0x00000000ff000000ULL) << 8) | \
  35. + (((uint64_t)(x) & 0x0000000000ff0000ULL) << 24) | \
  36. + (((uint64_t)(x) & 0x000000000000ff00ULL) << 40) | \
  37. + (((uint64_t)(x) & 0x00000000000000ffULL) << 56)))
  38. +
  39. +
  40. typedef std::vector<AppRegistryEntry> FlowApplicationInfo;
  41. struct AppIdFlowContentPattern