Use bools instead of single-bit bitfields in Ident and TCP protocol analyzers

This commit is contained in:
Tim Wojtulewicz 2020-01-07 12:07:40 -07:00
parent 9d38419e8a
commit 0f8f53808e
8 changed files with 47 additions and 48 deletions

View file

@ -35,12 +35,12 @@ public:
int CRLFAsEOL()
{ return CR_LF_as_EOL ; }
int HasPartialLine() const;
bool HasPartialLine() const;
bool SkipDeliveries() const
{ return skip_deliveries; }
void SetSkipDeliveries(int should_skip)
void SetSkipDeliveries(bool should_skip)
{ skip_deliveries = should_skip; }
// We actually have two delivery modes: line delivery and plain
@ -97,21 +97,21 @@ protected:
// Remaining bytes to deliver plain.
int64_t plain_delivery_length;
int is_plain;
bool is_plain;
// Don't deliver further data.
int skip_deliveries;
bool skip_deliveries;
bool suppress_weirds;
// If true, flag (first) line with embedded NUL.
unsigned int flag_NULs:1;
bool flag_NULs;
// Whether single CR / LF are considered as EOL.
unsigned int CR_LF_as_EOL:2;
uint8_t CR_LF_as_EOL:2;
// Whether to skip partial conns.
unsigned int skip_partial:1;
bool skip_partial;
};
} } // namespace analyzer::*
} } // namespace analyzer::*