hexdump.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * TAP-Windows -- A kernel driver to provide virtual tap
  3. * device functionality on Windows.
  4. *
  5. * This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
  6. *
  7. * This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
  8. * and is released under the GPL version 2 (see below).
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2
  12. * as published by the Free Software Foundation.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program (see the file COPYING included with this
  21. * distribution); if not, write to the Free Software Foundation, Inc.,
  22. * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. */
  24. #ifndef HEXDUMP_DEFINED
  25. #define HEXDUMP_DEFINED
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. //=====================================================================================
  30. // Debug Routines
  31. //=====================================================================================
  32. #ifndef NDIS_MINIPORT_DRIVER
  33. # include <stdio.h>
  34. # include <ctype.h>
  35. # include <windows.h>
  36. # include <winnt.h>
  37. # include <memory.h>
  38. # ifndef DEBUGP
  39. # define DEBUGP(fmt) { DbgMessage fmt; }
  40. # endif
  41. extern VOID (*DbgMessage)(char *p_Format, ...);
  42. VOID DisplayDebugString (char *p_Format, ...);
  43. #endif
  44. //===================================================================================
  45. // Reporting / Debugging
  46. //===================================================================================
  47. #define IfPrint(c) (c >= 32 && c < 127 ? c : '.')
  48. VOID HexDump (unsigned char *p_Buffer, unsigned long p_Size);
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52. #endif