packet_dump.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. EQ2Emulator: Everquest II Server Emulator
  3. Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
  4. This file is part of EQ2Emulator.
  5. EQ2Emulator is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. EQ2Emulator is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef PACKET_DUMP_H
  17. #define PACKET_DUMP_H
  18. #include <iostream>
  19. using namespace std;
  20. #include "../common/types.h"
  21. #include "EQPacket.h"
  22. class ServerPacket;
  23. void DumpPacketAscii(const uchar* buf, int32 size, int32 cols=16, int32 skip=0);
  24. void DumpPacketHex(const uchar* buf, int32 size, int32 cols=16, int32 skip=0);
  25. void DumpPacketBin(const void* data, int32 len);
  26. void DumpPacket(const uchar* buf, int32 size);
  27. void DumpPacket(const ServerPacket* pack, bool iShowInfo = false);
  28. void DumpPacketBin(const ServerPacket* pack);
  29. void DumpPacketBin(int32 data);
  30. void DumpPacketBin(int16 data);
  31. void DumpPacketBin(int8 data);
  32. #endif