Simple dnscap patch to have epoch date as output

This commit is contained in:
Alexandre Dulaunoy 2012-03-21 17:32:11 +01:00
parent 7b26fb3dfa
commit daeb9a1a4a

View file

@ -10,7 +10,8 @@ The data store format is described in ./doc/datastore-format.txt
Installation Installation
------------ ------------
This is the minimal set to run a standalone passive-dns. This is the minimal set to run a standalone passive-dns using dnscap
as a source for the DNS packets.
* Install [redis](http://www.redis.io/). * Install [redis](http://www.redis.io/).
* Start ./src/redis-server * Start ./src/redis-server
@ -25,3 +26,13 @@ This is the minimal set to run a standalone passive-dns.
The install process will be automated in the next release. The install process will be automated in the next release.
dnscap
------
Patch dnscap.c (from branches/wessels) to output the date in epoch format.
- strftime(when, sizeof when, "%Y-%m-%d %T", tm);
+ strftime(when, sizeof when, "%s", tm);
When having multiple flows of DNS queries, it's better to convert the date
as soon as possible.