darkstat
9 years agoMake HTML template more flexible.
Malte S. Stretz [Wed, 1 Sep 2010 11:19:05 +0000 (13:19 +0200)]
Make HTML template more flexible.

Preparation for URI base feature.  It is a little bit more overhead than
just appending constant strings, but I doubt it is measurable.  Also, it
unifies the appearance a bit more since the <title> etc. is now also
generated by html_open() instead differently in each page generator.

9 years agoImplement export/import of struct addr.
Emil Mikulic [Sun, 15 May 2011 09:09:47 +0000 (19:09 +1000)]
Implement export/import of struct addr.

9 years agoCheck libbsd for strtonum.
Emil Mikulic [Sun, 15 May 2011 08:39:37 +0000 (18:39 +1000)]
Check libbsd for strtonum.

9 years agoRemove verbose output I'm comfortable removing.
Emil Mikulic [Sun, 15 May 2011 08:25:04 +0000 (18:25 +1000)]
Remove verbose output I'm comfortable removing.

9 years agoMake host_get() not invalidate old records.
Emil Mikulic [Sun, 15 May 2011 07:54:11 +0000 (17:54 +1000)]
Make host_get() not invalidate old records.

9 years agoFactor out decode_ip_payload()
Emil Mikulic [Sun, 15 May 2011 07:50:54 +0000 (17:50 +1000)]
Factor out decode_ip_payload()

This code was duplicated for v4 and v6.  Additionally, don't do
accounting if we couldn't decode the TCP/UDP header.

9 years agoImplement SIGUSR2 to save the DB without resetting it.
Emil Mikulic [Sun, 15 May 2011 07:42:16 +0000 (17:42 +1000)]
Implement SIGUSR2 to save the DB without resetting it.

This has been requested a few times.

9 years agoBe less noisy when building.
Emil Mikulic [Tue, 10 May 2011 14:43:52 +0000 (00:43 +1000)]
Be less noisy when building.

9 years agoUse struct addr - big cleanup.
Emil Mikulic [Tue, 10 May 2011 12:01:25 +0000 (22:01 +1000)]
Use struct addr - big cleanup.

9 years agoImplement addr_mask and addr_inside and tests.
Emil Mikulic [Tue, 10 May 2011 13:28:21 +0000 (23:28 +1000)]
Implement addr_mask and addr_inside and tests.

9 years agoImplement str_to_addr() and unit test.
Emil Mikulic [Tue, 10 May 2011 12:51:49 +0000 (22:51 +1000)]
Implement str_to_addr() and unit test.

9 years agoCreate addr module.
Emil Mikulic [Tue, 10 May 2011 11:53:25 +0000 (21:53 +1000)]
Create addr module.

9 years agoWarn if pcap_dispatch looks like it's blocking.
Emil Mikulic [Wed, 12 Aug 2009 12:45:34 +0000 (22:45 +1000)]
Warn if pcap_dispatch looks like it's blocking.

9 years agoAdd --disable-debug to switch on NDEBUG and -g0.
Malte S. Stretz [Fri, 3 Sep 2010 14:15:59 +0000 (16:15 +0200)]
Add --disable-debug to switch on NDEBUG and -g0.

9 years agoReplace --with-mad-warnings with --enable-mad-warnings.
Malte S. Stretz [Fri, 3 Sep 2010 13:57:02 +0000 (15:57 +0200)]
Replace --with-mad-warnings with --enable-mad-warnings.

9 years agoMake headers self-sufficient.
Emil Mikulic [Mon, 9 May 2011 13:42:44 +0000 (23:42 +1000)]
Make headers self-sufficient.

9 years agoScript to test if headers are self-sufficient.
Emil Mikulic [Wed, 4 May 2011 15:00:43 +0000 (01:00 +1000)]
Script to test if headers are self-sufficient.

9 years agoDon't hide that linkhdr_t is a struct.
Emil Mikulic [Mon, 9 May 2011 13:25:12 +0000 (23:25 +1000)]
Don't hide that linkhdr_t is a struct.

9 years agoBe explicit about missing case.
Emil Mikulic [Wed, 4 May 2011 12:54:38 +0000 (22:54 +1000)]
Be explicit about missing case.

9 years agoEnable more GCC warnings.
Emil Mikulic [Mon, 9 May 2011 13:13:39 +0000 (23:13 +1000)]
Enable more GCC warnings.

9 years agoLoad strl* from libbsd if available.
Malte S. Stretz [Fri, 3 Sep 2010 15:01:40 +0000 (17:01 +0200)]
Load strl* from libbsd if available.

9 years agoIgnore vim swap files.
Malte S. Stretz [Thu, 2 Sep 2010 21:52:33 +0000 (23:52 +0200)]
Ignore vim swap files.

9 years agoAdd myself to AUTHORS.
Malte S. Stretz [Wed, 1 Sep 2010 12:59:52 +0000 (14:59 +0200)]
Add myself to AUTHORS.

9 years agoDon't duplicate bindaddr.
Emil Mikulic [Mon, 9 May 2011 13:01:12 +0000 (23:01 +1000)]
Don't duplicate bindaddr.

9 years agoIgnore generated man page.
Malte S. Stretz [Tue, 31 Aug 2010 18:46:15 +0000 (20:46 +0200)]
Ignore generated man page.

9 years agoPick nits.
Emil Mikulic [Sat, 9 Apr 2011 13:03:09 +0000 (23:03 +1000)]
Pick nits.

9 years agoCSS tweaks.
Emil Mikulic [Sat, 9 Apr 2011 12:47:58 +0000 (22:47 +1000)]
CSS tweaks.

Add text-shadow to menu bar, don't wrap rates.

9 years agoThese days, tcpdump snaplen default is 96 bytes.
Emil Mikulic [Sat, 9 Apr 2011 12:36:41 +0000 (22:36 +1000)]
These days, tcpdump snaplen default is 96 bytes.

9 years agobuild-essential is not plural.
Emil Mikulic [Thu, 7 Apr 2011 11:52:30 +0000 (21:52 +1000)]
build-essential is not plural.

9 years agoallow sort on "last seen"
Dirk Koopman [Tue, 21 Sep 2010 11:27:47 +0000 (12:27 +0100)]
allow sort on "last seen"

This is very useful for those "who was doing that just now" moments

9 years agoActivate accounting for IPv6 hosts.
Mats Erik Andersson [Thu, 14 Oct 2010 13:11:59 +0000 (15:11 +0200)]
Activate accounting for IPv6 hosts.

The already implemented host table functions are put
to work also for IPv6 hosts. In addition, IPPROTO_AH,
IPPROTO_ESP, and IPPROTO_OSPF now prevent complaints
about these protocols being unknown.

A complete URI is augmented for hostreporting, since
the dubble colon can be confused for a protocol switch.

9 years agoImplement full netmasking for IPv4 and IPv6.
Mats Erik Andersson [Thu, 14 Oct 2010 10:49:54 +0000 (12:49 +0200)]
Implement full netmasking for IPv4 and IPv6.

A helper function "strtonum()" is implemented for platforms
where it is missing. This is detected in "configure.ac".

Netmasks with prefix length is implemented for IPv4, whereas
netmasks with explicit masks or with prefixes as built for IPv6.

9 years agoMigration from 'in_addr_t' to 'struct addr46'.
Mats Erik Andersson [Wed, 13 Oct 2010 19:28:45 +0000 (21:28 +0200)]
Migration from 'in_addr_t' to 'struct addr46'.

In order to achieve a uniform handling of IPv4
and IPv6, a new structure 'struct addr46' encloses
both address families in a space efficient manner.
This commit completes the migration, and achieves
functionality for IPv4 accounting and IPv4 DNS lookup.

9 years agoSmall IPv6 corrections and an IPv6 hash function.
Mats Erik Andersson [Wed, 29 Sep 2010 21:46:11 +0000 (23:46 +0200)]
Small IPv6 corrections and an IPv6 hash function.

9 years agoConditional replacement of ETHERTYPE_IPV6.
Mats Erik Andersson [Wed, 29 Sep 2010 20:46:20 +0000 (22:46 +0200)]
Conditional replacement of ETHERTYPE_IPV6.

Autoconf test for <net/if_ether.h> needed for GNU/kfreebsd.
If possible, define ETHERTYPE_IPV6 as ETH_P_IPV6.

9 years agoFine tuning for OpenBSD and GNU/kfreebsd.
Mats Erik Andersson [Wed, 29 Sep 2010 14:36:54 +0000 (16:36 +0200)]
Fine tuning for OpenBSD and GNU/kfreebsd.

GNU/Linux and FreeBSD are also fine with these.

9 years agoGet this compiling again on FreeBSD
Emil Mikulic [Tue, 1 Jun 2010 10:48:44 +0000 (20:48 +1000)]
Get this compiling again on FreeBSD

9 years agoFirst graphical accounting of IPv6.
Mats Erik Andersson [Sat, 29 May 2010 10:06:52 +0000 (12:06 +0200)]
First graphical accounting of IPv6.

There are two small changes to "http.c" that corrects
the format string and that reuses the exact length of
the structure in use.

The main changes, however, deal with detection, reporting,
and accounting of IPv6 traffic over the chosen interface.

The present code is only able to match the exact
IPv6 address of the interface to the packet, be it
inbound or outbound. No possibility to set the
netmask length.

The accounting only adds sizes of the packets,
it never goes on to deal with fine grained information.
You will see a conditional in 'acct.c' with a comment
stating that IPv6 proceeds no further.

9 years agoInclude sys/socket.h for AF_UNSPEC on FreeBSD
Emil Mikulic [Thu, 27 May 2010 14:02:49 +0000 (00:02 +1000)]
Include sys/socket.h for AF_UNSPEC on FreeBSD

Suggested by: Mats

9 years agoMaking the webserver IPv6 capable.
Mats Erik Andersson [Wed, 26 May 2010 17:31:34 +0000 (19:31 +0200)]
Making the webserver IPv6 capable.

Options like

   -b 0.0.0.0   -b 127.0.0.1
   -b ::        -b ::1
   -b bug.me.local

are now usable.

10 years agomanpage: display the actual package version 3.0.713
Emil Mikulic [Fri, 5 Mar 2010 06:06:12 +0000 (17:06 +1100)]
manpage: display the actual package version

10 years agoUpdate ChangeLog in preparation for darkstat 3.0.713
Emil Mikulic [Mon, 18 Jan 2010 06:40:04 +0000 (17:40 +1100)]
Update ChangeLog in preparation for darkstat 3.0.713

10 years agoconfigure: give better --with-chroot-dir example
Emil Mikulic [Fri, 5 Mar 2010 05:09:13 +0000 (16:09 +1100)]
configure: give better --with-chroot-dir example

Don't allow "yes" as a chroot directory.

Also, as much as this pains me, be less jerky.
It turns out that not every Unix is as awesome as OpenBSD.

10 years agoImplement --wait
Emil Mikulic [Sun, 17 Jan 2010 14:17:11 +0000 (01:17 +1100)]
Implement --wait

10 years agoRemove dead stores.
Emil Mikulic [Sun, 17 Jan 2010 14:41:52 +0000 (01:41 +1100)]
Remove dead stores.

Found by: Clang Static Analyzer

10 years agoTweak manpage wording and formatting.
Emil Mikulic [Sun, 17 Jan 2010 14:17:51 +0000 (01:17 +1100)]
Tweak manpage wording and formatting.

10 years agoMerge THANKS into AUTHORS.
Emil Mikulic [Sun, 17 Jan 2010 13:52:30 +0000 (00:52 +1100)]
Merge THANKS into AUTHORS.

10 years agoShip the ChangeLog when rolling a release.
Emil Mikulic [Wed, 18 Nov 2009 11:59:01 +0000 (22:59 +1100)]
Ship the ChangeLog when rolling a release.

10 years agoAdd ChangeLog from darkstat website.
Emil Mikulic [Wed, 18 Nov 2009 11:58:10 +0000 (22:58 +1100)]
Add ChangeLog from darkstat website.

11 years agoImprove wording of "network internal"
Emil Mikulic [Wed, 16 Sep 2009 13:15:36 +0000 (23:15 +1000)]
Improve wording of "network internal"

11 years agoImprove --pppoe example and mention nas0 interface.
Emil Mikulic [Wed, 16 Sep 2009 13:11:28 +0000 (23:11 +1000)]
Improve --pppoe example and mention nas0 interface.

Requested by: Prof A Olowofoyeku / routertech.org

11 years agoImplement and document --syslog
Emil Mikulic [Wed, 16 Sep 2009 13:01:52 +0000 (23:01 +1000)]
Implement and document --syslog

11 years agoImprove the "timeout on" diagnostic message.
Emil Mikulic [Wed, 26 Aug 2009 11:59:09 +0000 (21:59 +1000)]
Improve the "timeout on" diagnostic message.

11 years agoHack around snaplen problem in recent Ubuntu.
Emil Mikulic [Mon, 17 Aug 2009 09:09:04 +0000 (19:09 +1000)]
Hack around snaplen problem in recent Ubuntu.

11 years agoImplement --snaplen
Emil Mikulic [Wed, 12 Aug 2009 12:24:29 +0000 (22:24 +1000)]
Implement --snaplen

11 years agoUse pcap_setnonblock() on Linux.
Emil Mikulic [Wed, 12 Aug 2009 12:48:24 +0000 (22:48 +1000)]
Use pcap_setnonblock() on Linux.

11 years agoImplement --no-lastseen
Emil Mikulic [Sat, 25 Apr 2009 13:57:23 +0000 (23:57 +1000)]
Implement --no-lastseen

11 years agoImplement --hexdump
Emil Mikulic [Sat, 25 Apr 2009 11:20:55 +0000 (21:20 +1000)]
Implement --hexdump

11 years agoManpage moved to section 8, adjust usage notice.
Emil Mikulic [Fri, 24 Apr 2009 11:43:44 +0000 (21:43 +1000)]
Manpage moved to section 8, adjust usage notice.

11 years agoAdjust {hosts,ports}-keep when they're not kept under max.
Emil Mikulic [Thu, 1 Jan 2009 12:27:48 +0000 (23:27 +1100)]
Adjust {hosts,ports}-keep when they're not kept under max.

Requested by: The Chief

11 years agoDon't apply ports-{max,keep} to protocols.
Emil Mikulic [Thu, 1 Jan 2009 12:27:11 +0000 (23:27 +1100)]
Don't apply ports-{max,keep} to protocols.

This helps us survive proto accounting when --ports-max is zero.

11 years agoSkip port accounting when --ports-max is zero.
Emil Mikulic [Thu, 1 Jan 2009 12:26:41 +0000 (23:26 +1100)]
Skip port accounting when --ports-max is zero.

11 years agoSkip per-host accounting if --hosts-max is zero.
Emil Mikulic [Thu, 1 Jan 2009 12:17:34 +0000 (23:17 +1100)]
Skip per-host accounting if --hosts-max is zero.

11 years agoBe very specific that max must be greater than keep.
Emil Mikulic [Thu, 1 Jan 2009 12:00:05 +0000 (23:00 +1100)]
Be very specific that max must be greater than keep.

Prompted by: a RouterTech user

11 years agoImplement support for DLT_RAW.
Anton S. Ustyuzhanin [Thu, 1 Jan 2009 11:36:07 +0000 (22:36 +1100)]
Implement support for DLT_RAW.

11 years agoIgnore errors from pcap_dispatch.
Emil Mikulic [Thu, 1 Jan 2009 11:30:37 +0000 (22:30 +1100)]
Ignore errors from pcap_dispatch.

This makes interface going down survivable on Linux.

Prompted by: Chris Franklin

11 years agomanual: Add example for specifying local IP via -l.
Dennis Jansen [Wed, 10 Dec 2008 10:37:31 +0000 (11:37 +0100)]
manual: Add example for specifying local IP via -l.

11 years agoDon't require --verbose for pcap_stats.
Emil Mikulic [Wed, 10 Dec 2008 10:59:50 +0000 (21:59 +1100)]
Don't require --verbose for pcap_stats.

How embarassing.  And it didn't get picked up during testing.

Noticed by: Dennis Jansen

11 years agoImport darkstat 3.0.712 3.0.712
Emil Mikulic [Fri, 24 Apr 2009 11:34:12 +0000 (21:34 +1000)]
Import darkstat 3.0.712