if (use_raw) {
uint64_t raw_progress = STREAM_RAW_PROGRESS(stream);
- if (StreamTcpInlineMode() == TRUE) {
+ if (StreamTcpInlineMode()) {
uint32_t chunk_size = (stream == &ssn->client) ?
stream_config.reassembly_toserver_chunk_size :
stream_config.reassembly_toclient_chunk_size;
last_ack_abs += (stream->last_ack - stream->base_seq);
}
/* in IDS mode we shouldn't see the base_seq pass last_ack */
- DEBUG_VALIDATE_BUG_ON(last_ack_abs < left_edge && StreamTcpInlineMode() == FALSE && !f->ffr &&
+ DEBUG_VALIDATE_BUG_ON(last_ack_abs < left_edge && !StreamTcpInlineMode() && !f->ffr &&
ssn->state < TCP_CLOSED);
left_edge = MIN(left_edge, last_ack_abs);
/* if we're told to look for overlaps with different data we should
* consider data that is ack'd as well. Injected packets may have
* been ack'd or injected packet may be too late. */
- if (StreamTcpInlineMode() == FALSE && check_overlap_different_data) {
+ if (!StreamTcpInlineMode() && check_overlap_different_data) {
const uint32_t window = stream->window ? stream->window : 4096;
if (window < left_edge)
left_edge -= window;
uint64_t StreamDataRightEdge(const TcpStream *stream, const bool eof)
{
uint64_t right_edge = STREAM_BASE_OFFSET(stream) + stream->segs_right_edge - stream->base_seq;
- if (!eof && StreamTcpInlineMode() == FALSE) {
+ if (!eof && !StreamTcpInlineMode()) {
right_edge = MIN(GetAbsLastAck(stream), right_edge);
}
return right_edge;
uint64_t StreamTcpGetUsable(const TcpStream *stream, const bool eof)
{
uint64_t right_edge = StreamingBufferGetConsecutiveDataRightEdge(&stream->sb);
- if (!eof && StreamTcpInlineMode() == FALSE) {
+ if (!eof && !StreamTcpInlineMode()) {
right_edge = MIN(GetAbsLastAck(stream), right_edge);
}
return right_edge;
if (overlap_diff_data) {
StreamTcpReassembleConfigEnableOverlapCheck();
}
- if (StreamTcpInlineMode() == TRUE) {
+ if (StreamTcpInlineMode()) {
StreamTcpReassembleConfigEnableOverlapCheck();
}
uint32_t adjusted = data_len;
/* get window of data that is acked */
- if (StreamTcpInlineMode() == FALSE) {
+ if (!StreamTcpInlineMode()) {
SCLogDebug("ssn->state %s", StreamTcpStateAsString(ssn->state));
if (data_len == 0 || ((ssn->state < TCP_CLOSED ||
(ssn->state == TCP_CLOSED &&
STREAMTCP_STREAM_FLAG_DISABLE_RAW))
return false;
- if (StreamTcpInlineMode() == FALSE) {
+ if (!StreamTcpInlineMode()) {
const uint64_t segs_re_abs =
STREAM_BASE_OFFSET(stream) + stream->segs_right_edge - stream->base_seq;
if (STREAM_RAW_PROGRESS(stream) == segs_re_abs) {
uint64_t *progress_out, bool respect_inspect_depth)
{
/* handle inline separately as the logic is very different */
- if (StreamTcpInlineMode() == TRUE) {
+ if (StreamTcpInlineMode()) {
return StreamReassembleRawInline(ssn, p, Callback, cb_data, progress_out);
}
void StreamTcpStreamCleanup(TcpStream *stream);
/* check if bypass is enabled */
int StreamTcpBypassEnabled(void);
-int StreamTcpInlineMode(void);
+bool StreamTcpInlineMode(void);
int TcpSessionPacketSsnReuse(const Packet *p, const Flow *f, const void *tcp_ssn);