Commit b52ec579 authored by Victor Seva's avatar Victor Seva

New upstream version 1.4.4

parent 630c9f35
# Ignore eclipse files
.*project
.settings
.vscode
# Build files
src/sngrep
......
2016-05-10 Ivan Alonso <kaian@irontec.com>
2017-09-17 Ivan Alonso <kaian@irontec.com>
* sngrep 1.4.4 released
* Fixed multiples crashes with SIP TCP payloads
* Improve configure detection for gnutls and ncurses
* HEP/EEP: removed default password
* HEP/EEP: hep capture mode is now displayed in call list window
* -I flag now supports reading from standard input
* Call List and Call Flow windows now resize properly
2017-05-10 Ivan Alonso <kaian@irontec.com>
* sngrep 1.4.3 released
* Capture
......
ACLOCAL_AMFLAGS = -I m4
SUBDIRS=src config doc tests
EXTRA_DIST=bootstrap.sh
......@@ -46,7 +46,7 @@ You can pass following flags to ./configure to enable some features
| `--enable-ipv6` | Enable IPv6 packet capture support. |
| `--enable-eep` | Enable EEP packet send/receive support. |
You can find [detailed instructions for some distributions] (https://github.com/irontec/sngrep/wiki/Building) on wiki.
You can find [detailed instructions for some distributions](https://github.com/irontec/sngrep/wiki/Building) on wiki.
## Usage
......@@ -63,16 +63,16 @@ or live capturing, saving packets to a new file
## Configuration
You can configure some options using [sngreprc] (https://github.com/irontec/sngrep/wiki/Configuration) file
You can configure some options using [sngreprc](https://github.com/irontec/sngrep/wiki/Configuration) file
## Frequent Asked Questions
Any feedback, request or question are welcomed at [#sngrep](https://webchat.freenode.net/?channels=sngrep) channel at irc.freenode.net
See FAQ on [Github Wiki](https://github.com/irontec/sngrep/wiki#frequent-asked-questions)
## License
## License
sngrep - SIP Messages flow viewer
Copyright (C) 2013-2016 Irontec S.L.
Copyright (C) 2013-2017 Irontec S.L.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
AC_PREREQ([2.59])
AC_INIT([sngrep], [1.4.3], [kaian@irontec.com], [sngrep], [http://www.irontec.com/])
AC_INIT([sngrep], [1.4.4], [kaian@irontec.com], [sngrep], [http://www.irontec.com/])
AM_INIT_AUTOMAKE([1.9])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_HEADERS([src/config.h])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
m4_ifdef([AC_CONFIG_MACRO_DIRS], AC_CONFIG_MACRO_DIRS([m4]), m4_include([m4/sngrep.m4]))
AC_COPYRIGHT("Irontec S.L.")
......@@ -26,6 +27,7 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_EGREP
AC_LANG(C)
AM_PROG_CC_C_O
#######################################################################
# Check for other REQUIRED libraries
......@@ -53,13 +55,13 @@ AS_IF([test "x$enable_unicode" == "xyes"], [
# Ncurses with wide-character support
AC_DEFINE([WITH_UNICODE], [], [Compile With Unicode compatibility])
AC_CHECK_HEADER([ncursesw/ncurses.h], [], [
AC_MSG_ERROR([ You need to have ncurses development files installed to compile sngrep.])
])
AC_CHECK_LIB([ncursesw], [initscr], [], [
AC_MSG_ERROR([ You need to have libncursesw installed to compile sngrep.])
])
SNGREP_CHECK_SCRIPT([ncursesw6], [addnwstr], [WITH_UNICODE], "ncursesw6-config",
SNGREP_CHECK_SCRIPT([ncursesw], [addnwstr], [WITH_UNICODE], "ncursesw5-config",
SNGREP_CHECK_SCRIPT([ncurses], [addnwstr], [WITH_UNICODE], "ncurses5-config",
SNGREP_CHECK_LIB([ncursesw6], [addnwstr], [WITH_UNICODE],
SNGREP_CHECK_LIB([ncursesw], [addnwstr], [WITH_UNICODE],
SNGREP_CHECK_LIB([ncurses], [addnwstr], [WITH_UNICODE],
))))))
AC_CHECK_LIB([panelw], [new_panel], [], [
AC_MSG_ERROR([ You need to have ncurses panelw library installed to compile sngrep.])
......@@ -106,14 +108,31 @@ AC_ARG_WITH([gnutls],
)
AS_IF([test "x$WITH_GNUTLS" == "xyes"], [
m4_ifdef([PKG_CHECK_MODULES], [
PKG_CHECK_MODULES([LIBGNUTLS], [gnutls])
], [
AC_CHECK_LIB([gnutls], [gnutls_init], [], [
AC_MSG_ERROR([ You need to have gnutls installed to compile sngrep])
])
])
AC_CHECK_LIB([gcrypt], [gcry_md_map_name], [], [
AC_MSG_ERROR([ You need to have libgcrypt installed to compile sngrep])
])
AC_PATH_PROG([LIBGCRYPT_CONFIG],[libgcrypt-config],[no])
if test "x${LIBGCRYPT_CONFIG}" = "xno"; then
AC_MSG_FAILURE([libgcrypt-config not found in PATH])
fi
AC_CHECK_LIB(
[gcrypt],
[gcry_md_map_name],
[LIBGCRYPT_CFLAGS="`${LIBGCRYPT_CONFIG} --cflags`"
LIBGCRYPT_LIBS="`${LIBGCRYPT_CONFIG} --libs`"
],
[AC_MSG_ERROR([ You need to have libgcrypt installed to compile sngrep])],
[`${LIBGCRYPT_CONFIG} --libs --cflags`]
)
AC_DEFINE([WITH_GNUTLS],[],[Compile With GnuTLS compatibility])
AC_SUBST(LIBGCRYPT_CFLAGS)
AC_SUBST(LIBGCRYPT_LIBS)
], [])
####
......
.\" Man page for the sngrep
.\"
.\" Copyright (c) 2013-2016 Ivan Alonso <kaian@irontec.com>
.\" Copyright (c) 2013-2016 Irontec S.L.
.\" Copyright (c) 2013-2017 Ivan Alonso <kaian@irontec.com>
.\" Copyright (c) 2013-2017 Irontec S.L.
.TH SNGREP 8 "December 2016" "sngrep 1.4.3"
.TH SNGREP 8 "September 2017" "sngrep 1.4.4"
.SH NAME
......
# serial 100
# sngrep.m4: Custom autotools macros for sngrep
#
# @author Adam Duskett <aduskett@codeblue.com>
# @version 2017-05-25
# @license GNU General Public License 3.0
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# As a special exception, the you may copy, distribute and modify the
# configure scripts that are the output of Autoconf when processing
# the Macro. You need not follow the terms of the GNU General Public
# License when using or distributing such scripts.
#
# SNGREP_CHECK_SCRIPT(LIBNAME, FUNCTION, DEFINE, CONFIG_SCRIPT, ELSE_PART)
AC_DEFUN([SNGREP_CHECK_SCRIPT],
[
if test ! -z "m4_toupper($SNGREP_[$1]_CONFIG_SCRIPT)"; then
# to be used to set the path to *-config when cross-compiling
sngrep_config_script=$(m4_toupper($SNGREP_[$1]_CONFIG_SCRIPT) --libs 2> /dev/null)
else
sngrep_config_script=$([$4] --libs 2> /dev/null)
fi
sngrep_script_success=no
sngrep_save_LDFLAGS="$LDFLAGS"
if test ! "x$sngrep_config_script" = x; then
LDFLAGS="$sngrep_config_script $LDFLAGS"
AC_CHECK_LIB([$1], [$2], [
AC_DEFINE([$3], 1, [The library is present.])
LIBS="$sngrep_config_script $LIBS "
sngrep_script_success=yes
], [])
LDFLAGS="$save_LDFLAGS"
fi
if test "x$sngrep_script_success" = xno; then
[$5]
fi
])
# SNGREP_CHECK_LIB(LIBNAME, FUNCTION, DEFINE, ELSE_PART)
AC_DEFUN([SNGREP_CHECK_LIB],
[
AC_CHECK_LIB([$1], [$2], [
AC_DEFINE([$3], 1, [The library is present.])
LIBS="-l[$1] $LIBS "
], [$4])
])
sngrep (1.4.4) experimental; urgency=low
* sngrep 1.4.4 releaed
-- Ivan Alonso <kaian@irontec.com> Sun, 17 Sep 2017 10:51:57 +0200
sngrep (1.4.3) experimental; urgency=low
* sngrep 1.4.3 releaed
......
......@@ -2,7 +2,7 @@
Summary: SIP Messages flow viewer
Name: sngrep
Version: 1.4.3
Version: 1.4.4
Release: 0%{?dist}
License: GPLv3
Group: Applications/Engineering
......@@ -59,6 +59,8 @@ make %{?_smp_mflags}
%{__rm} -rf %{buildroot}
%changelog
* Sun Sep 17 2017 Ivan Alonso <kaian@irontec.com> - 1.4.4
- Version 1.4.4
* Wed May 10 2017 Ivan Alonso <kaian@irontec.com> - 1.4.3
- Version 1.4.3
* Fri Dec 19 2016 Ivan Alonso <kaian@irontec.com> - 1.4.2
......
......@@ -8,6 +8,8 @@ sngrep_SOURCES+=capture_eep.c
endif
if WITH_GNUTLS
sngrep_SOURCES+=capture_gnutls.c
sngrep_CFLAGS+=$(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS)
sngrep_LDADD+=$(LIBGNUTLS_LIBS) $(LIBGCRYPT_LIBS)
endif
if WITH_OPENSSL
sngrep_SOURCES+=capture_openssl.c
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......@@ -169,6 +169,11 @@ capture_offline(const char *infile, const char *outfile)
return 1;
}
// Check if file is standard input
if (strlen(infile) == 1 && *infile == '-') {
infile = "/dev/stdin";
}
// Set capture input file
capinfo->infile = infile;
......@@ -390,6 +395,17 @@ capture_packet_reasm_ip(capture_info_t *capinfo, const struct pcap_pkthdr *heade
}
}
#ifdef SLL_HDR_LEN
if (capinfo->link == DLT_LINUX_SLL) {
struct sll_header *sll = (struct sll_header *) packet;
if (ntohs(sll->sll_protocol) == ETHERTYPE_8021Q) {
link_hl += 4;
}
}
#endif
// Get IP header
ip4 = (struct ip *) (packet + link_hl);
......@@ -588,6 +604,7 @@ capture_packet_reasm_tcp(capture_info_t *capinfo, packet_t *packet, struct tcphd
memcpy(full_payload, pkt->payload, pkt->payload_len);
// This packet is ready to be parsed
int original_size = pkt->payload_len;
int valid = sip_validate_packet(pkt);
if (valid == VALIDATE_COMPLETE_SIP) {
// Full SIP packet!
......@@ -598,9 +615,11 @@ capture_packet_reasm_tcp(capture_info_t *capinfo, packet_t *packet, struct tcphd
// We have a full SIP Packet, but do not remove everything from the reasm queue
packet_t *cont = packet_clone(pkt);
int pldiff = size_payload - pkt->payload_len;
packet_set_payload(cont, full_payload + pkt->payload_len, pldiff);
vector_append(capinfo->tcp_reasm, cont);
int pldiff = original_size - pkt->payload_len;
if (pldiff > 0 && pldiff < MAX_CAPTURE_LEN) {
packet_set_payload(cont, full_payload + pkt->payload_len, pldiff);
vector_append(capinfo->tcp_reasm, cont);
}
// Return the full initial packet
return pkt;
......@@ -754,6 +773,11 @@ capture_close()
if (vector_count(capture_cfg.sources) == 0)
return;
// Close dump file
if (capture_cfg.pd) {
dump_close(capture_cfg.pd);
}
// Stop all captures
vector_iter_t it = vector_iterator(capture_cfg.sources);
while ((capinfo = vector_iterator_next(&it))) {
......@@ -761,14 +785,9 @@ capture_close()
if (capinfo->handle) {
pcap_breakloop(capinfo->handle);
pthread_join(capinfo->capture_t, NULL);
pcap_close(capinfo->handle);
}
}
// Close dump file
if (capture_cfg.pd) {
dump_close(capture_cfg.pd);
}
}
int
......@@ -781,6 +800,8 @@ capture_launch_thread(capture_info_t *capinfo)
// Start all captures threads
vector_iter_t it = vector_iterator(capture_cfg.sources);
while ((capinfo = vector_iterator_next(&it))) {
// Mark capture as running
capinfo->running = true;
if (pthread_create(&capinfo->capture_t, &attr, (void *) capture_thread, capinfo)) {
return 1;
}
......@@ -797,7 +818,8 @@ capture_thread(void *info)
// Parse available packets
pcap_loop(capinfo->handle, -1, parse_packet, (u_char *) capinfo);
pcap_close(capinfo->handle);
capinfo->running = false;
}
int
......@@ -812,6 +834,18 @@ capture_is_online()
return 1;
}
int
capture_is_running()
{
capture_info_t *capinfo;
vector_iter_t it = vector_iterator(capture_cfg.sources);
while ((capinfo = vector_iterator_next(&it))) {
if (capinfo->running)
return 1;
}
return 0;
}
int
capture_set_bpf_filter(const char *filter)
{
......@@ -871,6 +905,13 @@ capture_status_desc()
}
}
#ifdef USE_EEP
// EEP Listen mode is always considered online
if (capture_eep_listen_port()) {
online++;
}
#endif
if (capture_paused()) {
if (online > 0 && offline == 0) {
return "Online (Paused)";
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......@@ -68,6 +68,10 @@
#include <netinet/ip6.h>
#endif
#ifdef SLL_HDR_LEN
#include <pcap/sll.h>
#endif
#include <arpa/inet.h>
#include <netinet/if_ether.h>
#include <netinet/ip.h>
......@@ -143,6 +147,8 @@ struct capture_config {
*/
struct capture_info
{
//! Flag to determine if capture is running
bool running;
//! libpcap link type
int link;
//! libpcap link header size
......@@ -313,6 +319,14 @@ capture_thread(void *none);
int
capture_is_online();
/**
* @brief Check if at least one capture handle is opened
*
* @return 1 if any capture source is running, 0 if all ended
*/
int
capture_is_running();
/**
* @brief Set a bpf filter in open capture
*
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
** Copyright (C) 2012 Homer Project (http://www.sipcapture.org)
**
** This program is free software: you can redistribute it and/or modify
......@@ -174,6 +174,18 @@ capture_eep_deinit()
}
}
const char *
capture_eep_send_port()
{
return eep_cfg.capt_port;
}
const char *
capture_eep_listen_port()
{
return eep_cfg.capt_srv_port;
}
int
capture_eep_send(packet_t *pkt)
{
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
** Copyright (C) 2012 Homer Project (http://www.sipcapture.org)
**
** This program is free software: you can redistribute it and/or modify
......@@ -226,6 +226,22 @@ capture_eep_init();
void
capture_eep_deinit();
/**
* @brief Return the remote port where HEP packets are sent
*
* @return Remote port or NULL if HEP send mode is not running
*/
const char *
capture_eep_send_port();
/**
* @brief Return the local port where HEP packets are received
*
* @return Local listen port or NULL if HEP listen mode is not running
*/
const char *
capture_eep_listen_port();
/**
* @brief Wrapper for sending packet in configured EEP version
*
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......@@ -32,10 +32,9 @@
#ifdef WITH_UNICODE
#define _X_OPEN_SOURCE_EXTENDED
#include <ncursesw/ncurses.h>
#else
#include <ncurses.h>
#include <wctype.h>
#endif
#include <ncurses.h>
//! Shorter declaration of scrollbar
typedef struct scrollbar scrollbar_t;
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......@@ -136,11 +136,29 @@ call_flow_info(ui_t *ui)
bool
call_flow_redraw(ui_t *ui)
{
int maxx, maxy;
// Get panel information
call_flow_info_t *info = call_flow_info(ui);
// Get current screen dimensions
getmaxyx(stdscr, maxy, maxx);
// Change the main window size
wresize(ui->win, maxy, maxx);
// Store new size
ui->width = maxx;
ui->height = maxy;
// Calculate available printable area
wresize(info->flow_win, maxy - 6, maxx);
// Force flow redraw
call_flow_draw(ui);
// Check if any of the group has changed
return call_group_has_changed(info->group);
// return call_group_has_changed(info->group);
return 0;
}
int
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......@@ -35,6 +35,9 @@
#include "option.h"
#include "filter.h"
#include "capture.h"
#ifdef USE_EEP
#include "capture_eep.h"
#endif
#include "ui_manager.h"
#include "ui_call_list.h"
#include "ui_call_flow.h"
......@@ -177,7 +180,7 @@ call_list_resize(ui_t *ui)
ui->height = maxy;
// Calculate available printable area
wresize(info->list_win, maxy - 5, maxx - 4);
wresize(info->list_win, maxy - 6, maxx); //-4
// Force list redraw
call_list_clear(ui);
......@@ -218,6 +221,16 @@ call_list_draw_header(ui_t *ui)
if ((device = capture_device()))
wprintw(ui->win, "[%s]", device);
#ifdef USE_EEP
const char *eep_port;
if ((eep_port = capture_eep_send_port())) {
wprintw(ui->win, "[H:%s]", eep_port);
}
if ((eep_port = capture_eep_listen_port())) {
wprintw(ui->win, "[L:%s]", eep_port);
}
#endif
wattroff(ui->win, COLOR_PAIR(CP_GREEN_ON_DEF));
wattroff(ui->win, COLOR_PAIR(CP_RED_ON_DEF));
......@@ -294,7 +307,7 @@ call_list_draw_header(ui_t *ui)
// Print calls count (also filtered)
sip_stats_t stats = sip_calls_stats();
mvwprintw(ui->win, 1, 35, "%*s", 35, "");
mvwprintw(ui->win, 1, 45, "%*s", 30, "");
if (stats.total != stats.displayed) {
mvwprintw(ui->win, 1, 45, "%s: %d (%d displayed)", countlb, stats.total, stats.displayed);
} else {
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)
** Copyright (C) 2013-2016 Irontec SL. All rights reserved.
** Copyright (C) 2013-2017 Ivan Alonso (Kaian)
** Copyright (C) 2013-2017 Irontec SL. All rights reserved.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
......
......@@ -2,8 +2,8 @@
**
** sngrep - SIP Messages flow viewer
**
** Copyright (C) 2013-2016 Ivan Alonso (Kaian)