From 2fcf2da1801845cf94f84f5f9d3f1bb27f4501a6 Mon Sep 17 00:00:00 2001 From: hemagx Date: Sun, 31 Jan 2016 15:53:35 +0200 Subject: Move P2PTR Macro to socket header and split the macro into two macros for WFIFO/RFIFO. Change packet database enums to defines in mmo.h --- src/common/mmo.h | 5 +++++ src/common/socket.h | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'src/common') diff --git a/src/common/mmo.h b/src/common/mmo.h index 6f573a571..981c1b30b 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -213,6 +213,11 @@ #define JOBL_BABY 0x2000 //8192 #define JOBL_THIRD 0x4000 //16384 +//Packet DB +#define MIN_PACKET_DB 0x0064 //what's the point of minimum packet id ? [hemagx] +#define MAX_PACKET_DB 0x0F00 +#define MAX_PACKET_POS 20 + #define SCRIPT_VARNAME_LENGTH 32 ///< Maximum length of a script variable struct hplugin_data_store; diff --git a/src/common/socket.h b/src/common/socket.h index b33fd2acf..8936c7772 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -77,6 +77,11 @@ struct hplugin_data_store; /* [Ind/Hercules] */ #define RFIFO2PTR(fd) (void*)(sockt->session[fd]->rdata + sockt->session[fd]->rdata_pos) +#define RP2PTR(fd) RFIFO2PTR(fd) + +/* [Hemagx/Hercules] */ +#define WFIFO2PTR(fd) (void*)(sockt->session[fd]->wdata + sockt->session[fd]->wdata_pos) +#define WP2PTR(fd) WFIFO2PTR(fd) // buffer I/O macros #define RBUFP(p,pos) (((uint8*)(p)) + (pos)) -- cgit v1.2.3-70-g09d2