Package: hping3
Version: 3.a2.ds2-6
Severity: wishlist

I'd wish to get something like this included to debian hping3 package

[ytti@sci ~/hping3-3.a2.ds2/debian/patches]% cat 
170_unidirectional_latency.diff 
Added support for printing unidirectional latencies

[ytti@sci ~/hping3-3.a2.ds2]% ./hping3 -1 --icmp-ts ns.anylayer.com
HPING ns.anylayer.com (eth0 194.150.168.86): icmp mode set, 28 headers + 0 data 
bytes
len=46 ip=194.150.168.86 ttl=56 id=997 icmp_seq=0 rtt=38.8 ms
ICMP timestamp: Originate=35412743 Receive=35412758 Transmit=35412758
ICMP timestamp RTT tsrtt=39 src->dst=15 dst->src=24

len=46 ip=194.150.168.86 ttl=56 id=998 icmp_seq=1 rtt=38.6 ms
ICMP timestamp: Originate=35413743 Receive=35413758 Transmit=35413758
ICMP timestamp RTT tsrtt=38 src->dst=15 dst->src=23

--- a/waitpacket.c
+++ b/waitpacket.c
@@ -185,15 +185,17 @@
 void log_icmp_ts(void *ts)
 {
        struct icmp_tstamp_data icmp_tstamp;
+       long unsigned int timestamp = get_midnight_ut_ms();
 
        memcpy(&icmp_tstamp, ts, sizeof(icmp_tstamp));
        printf("ICMP timestamp: Originate=%u Receive=%u Transmit=%u\n",
                (unsigned int) ntohl(icmp_tstamp.orig),
                (unsigned int) ntohl(icmp_tstamp.recv),
                (unsigned int) ntohl(icmp_tstamp.tran));
-       printf("ICMP timestamp RTT tsrtt=%lu\n\n",
-               (long unsigned int) (get_midnight_ut_ms() 
-                                     - ntohl(icmp_tstamp.orig)));
+       printf("ICMP timestamp RTT tsrtt=%lu src->dst=%lu dst->src=%lu\n\n",
+               (long unsigned int) (timestamp - ntohl(icmp_tstamp.orig)),
+               (long unsigned int) (ntohl(icmp_tstamp.recv) - 
ntohl(icmp_tstamp.orig)),
+               (long unsigned int) (timestamp - ntohl(icmp_tstamp.tran)));
 }
 
 void log_icmp_addr(void *addrptr)
[ytti@sci ~/hping3-3.a2.ds2/debian/patches]% 



-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages hping3 depends on:
ii  libc6       2.13-21
ii  libpcap0.8  1.1.1-10
ii  tcl8.4      8.4.19-4

hping3 recommends no packages.

hping3 suggests no packages.

-- debconf-show failed



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to