From 4495efcb62fe1dd2ed1edadc7b83cabc86e45027 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Fri, 25 Mar 2011 20:44:26 +0100 Subject: [PATCH] Add macro for direct access In some case, this is needed to have a direct access to the pkt field. This patch adds macro for this usage. --- src/decode.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/decode.h b/src/decode.h index f8cbc3a3ac..4bdaad99a1 100644 --- a/src/decode.h +++ b/src/decode.h @@ -171,6 +171,8 @@ typedef struct Address_ { #define GET_PKT_LEN(p) ((p)->pktlen) #define GET_PKT_DATA(p) ((((p)->ext_pkt) == NULL ) ? (p)->pkt : (p)->ext_pkt) +#define GET_PKT_DIRECT_DATA(p) (p)->pkt +#define GET_PKT_DIRECT_MAX_SIZE(p) default_packet_size - 1 #define SET_PKT_LEN(p, len) do { \ (p)->pktlen = len; \