mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 04:28:20 +00:00
Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath: Remove automatic use of gperftools on non-Linux systems. Fix uninitialized value for 'is_partial' in TCP analyzer. parse 64-bit consts correctly. on 32-bit machines only unsigned long longs are 64-bits long. Not just unsigned longs...
This commit is contained in:
commit
a24abddc5f
8 changed files with 50 additions and 19 deletions
|
@ -46,6 +46,7 @@ TCP_Analyzer::TCP_Analyzer(Connection* conn)
|
|||
finished = 0;
|
||||
reassembling = 0;
|
||||
first_packet_seen = 0;
|
||||
is_partial = 0;
|
||||
|
||||
orig = new TCP_Endpoint(this, 1);
|
||||
resp = new TCP_Endpoint(this, 0);
|
||||
|
|
|
@ -56,7 +56,7 @@ void modp_uitoa10(uint32_t value, char* str)
|
|||
void modp_litoa10(int64_t value, char* str)
|
||||
{
|
||||
char* wstr=str;
|
||||
unsigned long uvalue = (value < 0) ? -value : value;
|
||||
uint64_t uvalue = (value < 0) ? -value : value;
|
||||
|
||||
// Conversion. Number is reversed.
|
||||
do *wstr++ = (char)(48 + (uvalue % 10)); while(uvalue /= 10);
|
||||
|
|
|
@ -439,7 +439,7 @@ F RET_CONST(new Val(false, TYPE_BOOL))
|
|||
{D} {
|
||||
// TODO: check if we can use strtoull instead of atol,
|
||||
// and similarly for {HEX}.
|
||||
RET_CONST(new Val(static_cast<unsigned int>(atol(yytext)),
|
||||
RET_CONST(new Val(static_cast<bro_uint_t>(strtoll(yytext, (char**) NULL, 10)),
|
||||
TYPE_COUNT))
|
||||
}
|
||||
{FLOAT} RET_CONST(new Val(atof(yytext), TYPE_DOUBLE))
|
||||
|
@ -483,7 +483,7 @@ F RET_CONST(new Val(false, TYPE_BOOL))
|
|||
|
||||
({D}"."){3}{D} RET_CONST(new AddrVal(yytext))
|
||||
|
||||
"0x"{HEX}+ RET_CONST(new Val(static_cast<bro_uint_t>(strtol(yytext, 0, 16)), TYPE_COUNT))
|
||||
"0x"{HEX}+ RET_CONST(new Val(static_cast<bro_uint_t>(strtoull(yytext, 0, 16)), TYPE_COUNT))
|
||||
|
||||
{H}("."{H})+ RET_CONST(dns_mgr->LookupHost(yytext))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue