Skip to content

Commit

Permalink
Merge pull request #22 from iptraf-ng/dev
Browse files Browse the repository at this point in the history
prepare and release version 1.2.0
  • Loading branch information
pecameron committed Jun 10, 2020
2 parents 9698cfd + cec8558 commit 3865a9d
Show file tree
Hide file tree
Showing 13 changed files with 144 additions and 239 deletions.
40 changes: 34 additions & 6 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
CHANGES file for iptraf-ng

* Philip Cameron <[email protected]> - 1.1.5
- Incorporate numerous cleanup changes in the code
- Revised documentation. Previous distributions shipped the
original IPTraf documentation.
- Bugfix: segfault in rate_add_rate
- Bugfix: Fix memory leak when destroying iflist
* Thu Jun 04 2020 Vitezslav Samel <[email protected]> - 1.2.0
- ipfrag: code refactoring (Nikola Pajkovsky)
- ifstats: sort interfaces by name (Jan Engelhardt)
- ifstats: fix memory leak (Phil Cameron)
- documentation update (Phil Cameron)
All changes below are done by Vitezslav Samel:
Fixes:
- ipmon: fix division by zero
- fix: detstats(), ifstats(): handle packets with incorrect header checksum
- fix: positionptr(): properly allocate newly created interfaces
- fix: detstats(): properly account non-IP packets
- fix: properly init curses (fixes view on some utf-8 terminals)
- fix: cidr_split_address(): fix buffer overflow
- ipmon: printentry(): fix printing of huge values
- build: use correct libraries (wide version of -lpanel)
- fix unsafe handling of printf() args (RedHat Bugzilla: 1842690)
- fix the CPU hog if the interface gets removed (RedHat Bugzilla: 1572750)
Enhancements:
- introduce packet capturing abstraction: add recvmmsg(), TPACKET_V2
and TPACKET_V3 mmap()ed capturing modules: this allow us to capture
in multigigabit speeds
- add partial support for IPoIB interfaces (full support cannot be done
because the kernel interface doesn't give us source address)
(RedHat Bugzilla: 1140211)
- merge rvnamed-ng into iptraf-ng
- allow scrolling with Home, End, PageUp and PageDown keys
- show dropped packet count
- pktsize: print in and out counters
- ifstats: show total packet rate and packet drop across all interfaces
- ipmon: show OSPF protocol version
- hostmon, ipmon: update screen only when needed (vastly reduces CPU
usage and also reduces packet drops)
- update source code to compile cleanly on modern gcc
- numerous code refactoring/cleaning up all over the source tree

* Tue Jul 23 2013 Nikola Pajkovsky <[email protected]> - 1.1.4
- locking code rewrite: only one instance is allowed now
Expand Down
4 changes: 2 additions & 2 deletions CHANGES.old
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ New features in IPTraf 2.4.0 and changes to IPTraf 2.3.1

This version now allows multiple instances of the same facility
in different processes, but only one instance can monitor an
interface. Please see the RELEASE-NOTES file.
interface.

As a consequence of the above changes, the default names of the
logfiles then reflect the instance or interface being
monitored. See the RELEASE-NOTES file.
monitored.

Implemented a dialog box allowing the user to log to a custom
log file.
Expand Down
105 changes: 47 additions & 58 deletions Documentation/manual.sgml.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,10 @@ interface, and the important features of the software.
<title>For Additional Information</title>
<para>
See the included README file for summarized and late-breaking information.
Also read the RELEASE-NOTES file for important new information about
this new version. The CHANGES file contains a record of the changes made
to the software since 1.0.0. README.rvnamed contains information on the
rvnamed reverse resolution program. See the other
README files for support and development information.
The CHANGES file contains a record of the changes made to the software
since 1.0.0. README.resolving contains information on the reverse resolution
function. See the other README files for support and development
information.
</para>
</sect1>

Expand Down Expand Up @@ -965,25 +964,23 @@ in the <emphasis><link linkend="config">Configure...</link></emphasis> menu.
</para>

<sidebar>
<title>The rvnamed Process</title>
<title>The Asynchronous Resolving Process</title>
<para>
The IP traffic monitor starts a daemon called
<command>rvnamed</command> to help speed
up reverse lookups without sacrificing too much keyboard control and
accuracy of the counts. While reverse lookup is being conducted in the
background, IP addresses will be used until the resolution is complete.
The IP traffic monitor starts a process to help speed up reverse lookups
without sacrificing too much keyboard control and accuracy of the counts.
While reverse lookup is being conducted in the background, IP addresses
will be used until the resolution is complete.
</para>
<para>
If for some reason <command>rvnamed</command> cannot start (probably due to
improper installation or lack of memory), and you are
on the Internet, and you enable reverse lookup, your
keyboard control can become very slow. This is because the standard
lookup functions do not return until they have completed their
tasks, and it can take several seconds for a name resolution
in the foreground to complete.
If for some reason the resolving process cannot start, and you are on the
Internet, and you enable reverse lookup, your keyboard control can become
very slow. This is because the standard lookup functions do not return
until they have completed their tasks, and it can take several seconds
for a name resolution in the foreground to complete.
</para>
<para>
<command>rvnamed</command> will spawn up to 200 children to process reverse DNS queries.
The resolving process will spawn up to 200 children to process reverse
DNS queries.
</para>
</sidebar>

Expand Down Expand Up @@ -2664,12 +2661,11 @@ with the <emphasis><link linkend="config">Configure...</link></emphasis> item in

<sect2> <title>Reverse DNS Lookups</title>
<para>
Activating reverse lookup
causes IPTraf-ng to find out the name of the hosts with the addresses
in the IP packets. When this option is enabled, IPTraf-ng's
IP traffic monitor starts the rvnamed DNS lookup server to help resolve
IP addresses in the background while allowing IPTraf-ng to
continue capturing packets.
Activating reverse lookup causes IPTraf-ng to find out the name of the
hosts with the addresses in the IP packets. When this option is enabled,
IPTraf-ng's IP traffic monitor starts the DNS lookup server to help resolve
IP addresses in the background while allowing IPTraf-ng to continue
capturing packets.
</para>
<para>
This option is off by default.
Expand Down Expand Up @@ -3796,13 +3792,13 @@ to the <command>iptraf-ng</command> command.

<simplemsgentry>
<msgtext>
<para><computeroutput>Can't start rvnamed; lookups will block
<para><computeroutput>Can't get communication sockets; lookups will block
</computeroutput></para></msgtext>
<msgexplan>
<para>

IPTraf-ng cannot start the <command>rvnamed</command> daemon; probably due
to a bad installation. IPTraf-ng will fall back to blocking lookups.
IPTraf-ng cannot communicate with the resolving process. IPTraf-ng will
fall back to blocking lookups.

</para>
</msgexplan>
Expand Down Expand Up @@ -3882,11 +3878,11 @@ to the <command>iptraf-ng</command> command.
<msgexplan>
<para>
This indicator appears if an error occurs receiving data
from the <command>rvnamed</command> program (IPC stands for Interprocess Communication).
from the resolving process (IPC stands for Interprocess Communication).
This indication should not occur under normal circumstances.
Report instances of this condition and the circumstances under which
it happens. You may also include data from the
<filename>rvnamed.log</filename> file.
<filename>rvnamed-ng.log</filename> file.

</para>
</msgexplan>
Expand Down Expand Up @@ -3926,11 +3922,11 @@ your command and return to the main menu.
</sect1>
<sect1 id="rvnamedmessages">
<title>
rvnamed-ng Messages
Resolving Process Messages
</title>
<para>
As a daemon, rvnamed does not send messages to the screen. It
writes its messages to the file <filename>rvnamed.log</filename> in the
Resolving process does not send messages to the screen. It
writes its messages to the file <filename>rvnamed-ng.log</filename> in the
IPTraf-ng log directory.
</para>
<msgset>
Expand All @@ -3942,10 +3938,9 @@ your command and return to the main menu.
</computeroutput></para></msgtext>
<msgexplan>
<para>

rvnamed was unable to open the communication endpoint for data reception
from the children it creates. This is highly unusual, and should it
occur, report the circumstances.
Resolving process was unable to open the communication endpoint for
data reception from the children it creates. This is highly unusual
and should it occur, report the circumstances.
</para>
</msgexplan>
</simplemsgentry>
Expand All @@ -3958,10 +3953,9 @@ your command and return to the main menu.
</computeroutput></para></msgtext>
<msgexplan>
<para>

rvnamed was unable to open the communication endpoint for data exchange
with the IPTraf-ng program. This is highly unusual, and should it
occur, report the circumstances.
Resolving process was unable to open the communication endpoint for
data exchange with the IPTraf-ng program. This is highly unusual and
should it occur, report the circumstances.
</para>
</msgexplan>
</simplemsgentry>
Expand All @@ -3975,11 +3969,9 @@ your command and return to the main menu.
</computeroutput></para></msgtext>
<msgexplan>
<para>

rvnamed was unable to assign a name
to the indicated communication socket. This may be due to a bad, full,
or corrupted filesystem.

Resolving process was unable to assign a name to the indicated
communication socket. This may be due to a bad, full or corrupted
filesystem.
</para>
</msgexplan>
</simplemsgentry>
Expand All @@ -3992,9 +3984,8 @@ your command and return to the main menu.
</computeroutput></para></msgtext>
<msgexplan>
<para>

rvnamed ran out of memory. IPTraf-ng will resort to blocking, and may freeze.

Resolving process ran out of memory. IPTraf-ng will resort to blocking
and may freeze.
</para>
</msgexplan>
</simplemsgentry>
Expand All @@ -4007,9 +3998,8 @@ your command and return to the main menu.
</computeroutput></para></msgtext>
<msgexplan>
<para>

rvnamed had a problem spawning a copy of itself to resolve the IP
address. rvnamed will simply return the IP address in its literal,
Resolving process had a problem spawning a copy of itself to resolve the IP
address; it will simply return the IP address in its literal,
dotted-decimal notation. IPTraf-ng will still function normally. This may
be due to lack of memory or a process limit hit.
</para>
Expand All @@ -4025,17 +4015,16 @@ your command and return to the main menu.
</computeroutput></para></msgtext>
<msgexplan>
<para>

rvnamed has reached its maximum number of child processes. This is
intended as a "brake" to prevent too many rvnamed children
from hogging your computer's resources and possibly crashing it.
Resolving process has reached its maximum number of child processes. This
is intended as a "brake" to prevent too many children from hogging
your computer's resources and possibly crashing it.
</para>
<para>
Unless IPTraf-ng is monitoring an extremely busy network without filters,
this shouldn't happen, at least, not that often. If you notice
this message, try applying filters or check your DNS server. Many times,
this can happen when the DNS server goes down for
whatever reason, and you have rvnamed children taking too long to resolve.
this can happen when the DNS server goes down for whatever reason
and you have resolving process children taking too long to resolve.
</para>
</msgexplan>
</simplemsgentry>
Expand Down
2 changes: 1 addition & 1 deletion GEN-VERSION-FILE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

GVF=VERSION-FILE
DEF_VER=1.1.5
DEF_VER=1.2.0
LF='
'

Expand Down
14 changes: 1 addition & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -392,25 +392,14 @@ endif

### Maintainer's dist rules

iptraf-ng.spec: iptraf-ng.spec.in
sed -e 's/@@IPTRAF_VERSION@@/$(IPTRAF_VERSION)/g' < $< > $@+
mv $@+ $@

IPTRAF_TARNAME = iptraf-ng-$(IPTRAF_VERSION)
dist: iptraf-ng.spec
dist:
@mkdir -p $(IPTRAF_TARNAME)
@cp iptraf-ng.spec (IPTRAF_TARNAME)
@cp --parents `git ls-files` $(IPTRAF_TARNAME)
$(TAR) cf $(IPTRAF_TARNAME).tar $(IPTRAF_TARNAME)
@$(RM) -rf $(IPTRAF_TARNAME)
gzip -f -9 $(IPTRAF_TARNAME).tar

rpm: dist
$(RPMBUILD) \
--define "_source_filedigest_algorithm md5" \
--define "_binary_filedigest_algorithm md5" \
-ta $(IPTRAF_TARNAME).tar.gz

### Documentation rules
html: Documentation/book1.html
pdf: Documentation/manual.pdf
Expand Down Expand Up @@ -448,7 +437,6 @@ clean:
$(RM) $(iptraf-o)
$(RM) $(ALL_PROGRAMS)
$(RM) -r $(dep_dirs)
$(RM) iptraf-ng.spec
$(RM) $(IPTRAF_TARNAME).tar.gz
$(RM) VERSION-FILE

Expand Down
10 changes: 4 additions & 6 deletions README
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
==========================================================================
IPTraf-ng README
--------------------------------------------------------------------------
See the RELEASE-NOTES for important update information.
See the CHANGES file for the history of changes.
See the INSTALL file for installation instructions.
--------------------------------------------------------------------------
Expand Down Expand Up @@ -37,9 +36,9 @@ see README.contact for more information.
IMPORTANT CHANGES
-----------------

Important changes are detailed in the RELEASE-NOTES and CHANGES files,
please take some time to read it. There are some changes in the log file
names, and the policies on multiple instances have been somewhat relaxed.
Important changes are detailed in the CHANGES file, please take some
time to read it. There are some changes in the log file names, and
the policies on multiple instances have been somewhat relaxed.

DISTRIBUTION NOTICE
-------------------
Expand Down Expand Up @@ -79,5 +78,4 @@ FOR FURTHER INFORMATION
Full information is in the manual in the Documentation directory. See
also the CHANGES file for a record of fixes and new features. Updates and
announcements are in the IPTraf-ng Web page indicated above. Other README
files contain some other bits of information. The RELEASE-NOTES file
contains important release-specific information.
files contain some other bits of information.
51 changes: 51 additions & 0 deletions README.resolving
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
============================================================================
README DOCUMENT FOR ASYNCHRONOUS REVERSE NAME RESOLVING
----------------------------------------------------------------------------

DESCRIPTION
-----------

IPTraf-ng incorporates a function to resolve IP addresses to host names
in the background, keeping IPTraf-ng from waiting until the lookup is
completed.

If Reverse Lookup is enabled in the Options menu, the IP Traffic Monitor
will fork another process and this process will attempt to resolve
addresses.

When the traffic monitor is done, IPTraf-ng tells this resolving process
to quit.


PROTOCOL
--------

Resolving process and IPTraf-ng communicate with each other with the UNIX
domain socket IPC facility. They use datagram sockets.

The communication protocol recognizes only 4 types of messages:

RVN_HELLO the Hello packet. This simply causes to throw it back,
telling it is active.

RVN_REQUEST a reverse lookup request. This message includes an IP address
to resolve. Upon receive of this request, resolving process
checks its internal cache to see if this IP address is
already resolved or being resolved. If it isn't in the cache
yet, it forks off a copy which resolves in the background,
while it returns the IP address in the meantime. Subsequent
requests will get the IP address until such time that the
child has completed the resolution, at which time, a request
will get the host name in reply.

RVN_REPLY resolving process marks reply packets with this tag. Reply
packets contain the resolved host name or the ASCII
representation of the IP address, and an indicator of the
state of the resolution for this address (NOTRESOLVED,
RESOLVING or RESOLVED).

RVN_QUIT Tells resolving process to terminate.

The datagram structure and #define's are found in the rvnamed.h header file.

Important rvnamed messages are written to /var/log/iptraf-ng/rvnamed.log.

0 comments on commit 3865a9d

Please sign in to comment.