2cc1bbea45
otherwise; from mjc
41 lines
1.6 KiB
Plaintext
41 lines
1.6 KiB
Plaintext
$OpenBSD: patch-tcptraceroute_c,v 1.4 2004/03/23 19:22:02 pvalchev Exp $
|
|
--- tcptraceroute.c.orig 2002-07-30 14:51:05.000000000 -0700
|
|
+++ tcptraceroute.c 2004-03-13 09:41:15.000000000 -0800
|
|
@@ -391,10 +391,10 @@ void pfatal(char *err)
|
|
void usage(void)
|
|
{
|
|
printf("\n%s\n%s\n", VERSION, BANNER);
|
|
- fatal("Usage: %s [-nNFSAE] [-i <interface>] [-f <first ttl>]
|
|
- [-l <packet length>] [-q <number of queries>] [-t <tos>]
|
|
- [-m <max ttl>] [-pP] <source port>] [-s <source address>]
|
|
- [-w <wait time>] <host> [destination port] [packet length]\n\n", name);
|
|
+ fatal("Usage: %s [-nNFSAE] [-i <interface>] [-f <first ttl>]\n"
|
|
+" [-l <packet length>] [-q <number of queries>] [-t <tos>]\n"
|
|
+" [-m <max ttl>] [-pP] <source port>] [-s <source address>]\n"
|
|
+" [-w <wait time>] <host> [destination port] [packet length]\n\n", name);
|
|
}
|
|
|
|
void about(void)
|
|
@@ -1182,9 +1182,9 @@ void initcapture(void)
|
|
if (! (pcap = pcap_open_live(device, offset + SNAPLEN, 0, 10, errbuf)))
|
|
fatal("pcap_open_live failed: %s", errbuf);
|
|
|
|
- safe_snprintf(filter, TEXTSIZE, "
|
|
- (tcp and src host %s and src port %d and dst host %s)
|
|
- or ((icmp[0] == 11 or icmp[0] == 3) and dst host %s)",
|
|
+ safe_snprintf(filter, TEXTSIZE, "\n"
|
|
+" (tcp and src host %s and src port %d and dst host %s)\n"
|
|
+" or ((icmp[0] == 11 or icmp[0] == 3) and dst host %s)",
|
|
iptos(dst_ip), dst_prt, iptos(src_ip), iptos(src_ip));
|
|
|
|
if (o_nofilter)
|
|
@@ -1386,7 +1386,7 @@ int capture(proberecord *record)
|
|
FD_ZERO(&sfd);
|
|
FD_SET(pcap_fd, &sfd);
|
|
|
|
- ret = o_noselect ? 1 : select(pcap_fd + 1, &sfd, NULL, NULL, &timeleft);
|
|
+ ret = 1;
|
|
|
|
if (ret < 0)
|
|
{
|