Ticket #116 (closed Problem: Duplicate)
pcapo_stats symatics are now the same on linux and bsd
| Reported by: | jones@… | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Bro | Version: | branches-robin-work |
| Keywords: | Cc: |
Description
The following code in src/PktSrc.cc:
#ifdef HAVE_LINUX
Linux clears its counters each time.
s->received = stats.received;
s->dropped = stats.dropped + pstat.ps_drop;
s->link = 0; not available
#else
Default assumes FreeBSD's semantics.
s->received = stats.received;
s->dropped = pstat.ps_drop;
s->link = pstat.ps_recv;
#endif
can be smplified to:
Default assumes FreeBSD's semantics.
s->received = stats.received;
s->dropped = pstat.ps_drop;
s->link = pstat.ps_recv;
With out this mode the error keep increasing on linux once you see a error.
Change History
Note: See
TracTickets for help on using
tickets.
Is there some #ifdef or autoconf goop we can use to retain backwards compatibility with older versions of Linux that still use the previous semantics?