During offline file parsing in No interface mode, instead of checking if any
capture handler was still open, it was checking if any capture mode was online.
When only files were supplied, the capture instantly ended, closing the just
started offline capture threads.
Improved Capture Mode call list text to indicate
eep current running mode.
EEP listen mode is considered an Online mode and
will be displayed as [L:port].
EEP send mode is not considered an input but it
will also still printed as [H:port] in Capture
mode label.
Author: Adam Duskett <aduskett@codeblue.com>
Ncurses detection is currently broken in buildroot.
This patch does the following:
- Add SNGREP_CHECK_SCRIPT to configure.ac which checks for a
libname, a function in that library, sets a define if found, and
if not found, moves on to the next part. This is taken from the
htop configure.ac.
- Adds SNGREP_CHECK_LIB to configure.ac which checks for a
library, a function within that library, sets a define if that function
is found, and if not found, moves on to the next part.
This is taken from the htop configure.ac
- Modifies scrollbar.h and ui_panel.h to include <wctypes.h> instead of
<ncursesw/ncurses.h> if unicode is supported.
gcrypt is linked with libgpg-error, use libgcrypt-config to find
this dependency. (libgcrypt doesn't provide a .pc file)
libgcrypt-config --libs
[...] -lgcrypt -lgpg-error
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Like the -I command line argument supports multiples files, this commit implements
the logics for supporting multiple -d command line arguments.
We have also changed the way status (online, offline) is calculated, based on the
loaded sources.
The IP and TCP reassembly vectors have been now moved into each capture source
structure to avoid locking the general canpture config struct (where those vector
used to live until now).
PKG_CHECK_MODULES macro is installed in pkg-config package which is not present
in all installations. While it has its advantes, we must check if it's available
to support legacy configurations.
The group struct allows managin multiple calls at the same time
and should provide a way to get the next and prev messages of the
group easily. The sorting logic should be done here, instead of
ordering arrows or other things.
Using AC_CHECK_LIB() doesn't work properly for static linking, because
it doesn't return information on transitive dependencies of
libraries. For example, if library A internally uses library B, then
with dynamic linking, doing -lA is sufficient. However, with static
linking, one must do -lA -lB, and AC_CHECK_LIB() will only give the -lA
information. This for example causes a build failure when building
sngrep statically with openssl enabled:
checking for SSL_new in -lssl... no
configure: error: You need to have libssl installed to compile sngrep
due to undefined symbols in the OpenSSL library.
The proper solution for this is to discover the library using
pkg-config, because pkg-config properly returns the list of necessary
libraries, as it understands the concept of "list of libraries needed
when dynamic linking" and "list of libraries needed for static linking".
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
VPATH is a mechanism used to allow out-of-tree build, not to use source
code from a different directory. For this purpose, one should simply use
the "subdir-objects" AUTOMAKE_OPTIONS, and reference the source code of
the sub-directory in the <prog>_SOURCES variable.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
For TCP it was supported than a packet may content only a part of
the SIP message, that continued in other packets.
In this case, the given pcap contains packets with multiples SIP
messages each.
This patch is far from perfect. For each of this packets, we
only handle the first message, and keep the rest in the reassembly
queue for later process. This means than, if the last packet of
the stream contains more than one SIP message, the last message
will not be handled never...
We consider an active RTP stream those that have received a RTP packet
in the last STREAM_INACTIVE_SECS seconds (which defaults to 3). This is
a bit adhoc display that requires testing.