9
3

packet_functions.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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_FUNCTIONS_H
  17. #define PACKET_FUNCTIONS_H
  18. #include "types.h"
  19. #include "EQPacket.h"
  20. int32 roll(int32 in, int8 bits);
  21. int64 roll(int64 in, int8 bits);
  22. int32 rorl(int32 in, int8 bits);
  23. int64 rorl(int64 in, int8 bits);
  24. void EncryptProfilePacket(EQApplicationPacket* app);
  25. void EncryptProfilePacket(uchar* pBuffer, int32 size);
  26. #define EncryptSpawnPacket EncryptZoneSpawnPacket
  27. //void EncryptSpawnPacket(EQApplicationPacket* app);
  28. //void EncryptSpawnPacket(uchar* pBuffer, int32 size);
  29. void EncryptZoneSpawnPacket(EQApplicationPacket* app);
  30. void EncryptZoneSpawnPacket(uchar* pBuffer, int32 size);
  31. int DeflatePacket(unsigned char* in_data, int in_length, unsigned char* out_data, int max_out_length);
  32. uint32 InflatePacket(uchar* indata, uint32 indatalen, uchar* outdata, uint32 outdatalen, bool iQuiet = false);
  33. uint32 GenerateCRC(int32 b, int32 bufsize, uchar *buf);
  34. #endif