Change the way fields are ordered to reduce TcpSegment structure
with 8 bytes.
/** 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;
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
*
#endif
typedef struct StreamingBufferSegment_ {
- uint64_t stream_offset;
uint32_t segment_len;
+ uint64_t stream_offset;
} __attribute__((__packed__)) StreamingBufferSegment;
StreamingBuffer *StreamingBufferInit(const StreamingBufferConfig *cfg);