openbsd-ports/net/trafd/patches/patch-trafd_traffic_c
form b1ae28d539 trafd 3.0.1
trafd is a superset of trafshow, and extends it by adding a daemon
which collects data about network connections (src, dst, protocol
and length). The resulting data can be dumped to a file for later
processing.
2000-09-15 05:17:40 +00:00

40 lines
1.4 KiB
Plaintext

$OpenBSD: patch-trafd_traffic_c,v 1.1.1.1 2000/09/15 05:17:40 form Exp $
--- trafd/traffic.c.orig Thu Nov 25 17:31:15 1999
+++ trafd/traffic.c Fri Sep 15 11:23:19 2000
@@ -214,7 +214,7 @@ traf_tcp(tp, ip)
t.p_port = tp->th_sport, t.who_srv = 1;
else if (tp->th_sport > tp->th_dport)
t.p_port = tp->th_dport, t.who_srv = 2;
- else if (tp->th_sport = tp->th_dport)
+ else if (tp->th_sport == tp->th_dport)
t.p_port = tp->th_sport, t.who_srv = 3;
if (t.p_port > IPPORT_RESERVED) {
if (s_port_big[tp->th_sport & (IPPORT_RESERVED-1)] & IPPROTO_TCP) {
@@ -224,7 +224,7 @@ traf_tcp(tp, ip)
t.p_port = tp->th_dport;
t.who_srv = 2;
}
- if (tp->th_sport = tp->th_dport) t.who_srv = 3;
+ if (tp->th_sport == tp->th_dport) t.who_srv = 3;
}
traf_add(insertentry(&t), t.n_bytes, t.n_psize);
@@ -261,7 +261,7 @@ traf_udp(up, ip)
t.p_port = up->uh_sport, t.who_srv = 1;
else if (up->uh_sport > up->uh_dport)
t.p_port = up->uh_dport, t.who_srv = 2;
- else if (up->uh_sport = up->uh_dport)
+ else if (up->uh_sport == up->uh_dport)
t.p_port = up->uh_sport, t.who_srv = 3;
if (t.p_port > IPPORT_RESERVED) {
if (s_port_big[up->uh_sport & (IPPORT_RESERVED-1)] & IPPROTO_UDP) {
@@ -271,7 +271,7 @@ traf_udp(up, ip)
t.p_port = up->uh_dport;
t.who_srv = 2;
}
- if (up->uh_sport = up->uh_dport) t.who_srv = 3;
+ if (up->uh_sport == up->uh_dport) t.who_srv = 3;
}
traf_add(insertentry(&t), t.n_bytes, t.n_psize);