stream/segments: change packing to reduce size

Change the way fields are ordered to reduce TcpSegment structure
with 8 bytes.
pull/3479/head
Victor Julien 7 years ago
parent b6b9b56e45
commit 269313a53e

@ -151,8 +151,8 @@ typedef struct HTPCfgRec_ {
/** Struct used to hold chunks of a body on a request */
struct HtpBodyChunk_ {
struct HtpBodyChunk_ *next; /**< Pointer to the next chunk */
StreamingBufferSegment sbseg;
int logged;
StreamingBufferSegment sbseg;
} __attribute__((__packed__));
typedef struct HtpBodyChunk_ HtpBodyChunk;

@ -62,9 +62,9 @@ typedef struct TcpSegment {
PoolThreadReserved res;
uint16_t payload_len; /**< actual size of the payload */
uint32_t seq;
RB_ENTRY(TcpSegment) __attribute__((__packed__)) rb;
StreamingBufferSegment sbseg;
RB_ENTRY(TcpSegment) rb;
} TcpSegment;
} __attribute__((__packed__)) TcpSegment;
/** \brief compare function for the Segment tree
*

@ -114,8 +114,8 @@ typedef struct StreamingBuffer_ {
#endif
typedef struct StreamingBufferSegment_ {
uint64_t stream_offset;
uint32_t segment_len;
uint64_t stream_offset;
} __attribute__((__packed__)) StreamingBufferSegment;
StreamingBuffer *StreamingBufferInit(const StreamingBufferConfig *cfg);

Loading…
Cancel
Save