capt_get_packet(): check for key press only every 20ms
[iptraf-ng.git] / README.rvnamed
blob129a2464c963e4a8b44027a10537ab2fa567dae3
1 ============================================================================
2 README DOCUMENT FOR RVNAMED
3 ----------------------------------------------------------------------------
5 DESCRIPTION
6 -----------
8 rvnamed is a supplementary program distributed with IPTraf 1.1 and 
9 later.  This is a reverse name resolution daemon used by IPTraf to 
10 resolve IP addresses to host names in the background, keeping IPTraf from 
11 waiting until the lookup is completed.
13 Starting with version 1.1.0, if Reverse Lookup is enabled in the Options 
14 menu, the IP Traffic Monitor will attempt to start rvnamed.  If for some 
15 reason rvnamed is already running, IPTraf will use it immediately.  
16 Otherwise, it will attempt to start rvnamed.  As of IPTraf 1.2.0, the
17 rvnamed is placed together with the main IPTraf executable in /usr/local/bin.
19 When the traffic monitor is done, IPTraf tells rvnamed to quit.
22 PROTOCOL
23 --------
25 rvnamed and IPTraf communicate with each other with the BSD UNIX domain 
26 socket IPC facility.  They use datagram sockets.
28 rvnamed recognizes only 4 types of messages:
30 RVN_HELLO       the Hello packet.  This simply causes rvnamed to throw it
31                 back to IPTraf, telling it rvnamed is active.
33 RVN_REQUEST     a reverse lookup request.  This message includes an IP address
34                 to resolve.  When rvnamed receives this request, it 
35                 checks its internal cache to see if this IP address is 
36                 already resolved or being resolved.  If it isn't in the cache
37                 yet, rvnamed forks off a copy which resolves in the background,
38                 while it returns the IP address in the meantime.  Subsequent
39                 requests will get the IP address until such time that the
40                 child has completed the resolution, at which time, a request
41                 will get the host name in reply.
43 RVN_REPLY       rvnamed marks reply packets with this tag.  Reply packets
44                 contain the resolved host name or the ASCII representation
45                 of the IP address, and an indicator of the state of the
46                 resolution for this address (NOTRESOLVED, RESOLVING, or
47                 RESOLVED).
49 RVN_QUIT        Tells rvnamed to terminate.
51 The datagram structure and #define's are found in the rvnamed.h header file.
53 Important rvnamed messages are written to /var/log/iptraf/rvnamed.log.
55 IPTraf 2.5.0 and 2.6.0 refined rvnamed's operation by including timeouts
56 for child processes (5 minutes) and better management of the internal
57 IP address/FQDN cache.  See the CHANGES file.
59 To reduce overhead, IPTraf will query rvnamed only once per invocation of 
60 the IP traffic monitor.
62 rvnamed should work properly with a correct installation.  Report any
63 problems to me at riker@seul.org.