dca4ca3df8
* replace hard coded user and mode for hping-suid option with SPECIAL_PERMS. * replace remaining of hard coded "man" with ${PKGMANDIR}. * add DESTDIR support. * merge patch-a{e,g}, both for same file. * patch to replace __sun__ with __sun for portability, pkglint(1) said. * also regen other patches with mkpatches(1).
47 lines
2 KiB
Text
47 lines
2 KiB
Text
$NetBSD: patch-ak,v 1.2 2009/02/11 08:06:17 obache Exp $
|
|
|
|
--- parseoptions.c.orig 2003-08-08 14:39:00.000000000 +0000
|
|
+++ parseoptions.c
|
|
@@ -31,10 +31,11 @@ enum { OPT_COUNT, OPT_INTERVAL, OPT_NUME
|
|
OPT_RROUTE, OPT_IPPROTO, OPT_ICMP_IPVER, OPT_ICMP_IPHLEN,
|
|
OPT_ICMP_IPLEN, OPT_ICMP_IPID, OPT_ICMP_IPPROTO, OPT_ICMP_CKSUM,
|
|
OPT_ICMP_TS, OPT_ICMP_ADDR, OPT_TCPEXITCODE, OPT_FAST, OPT_TR_KEEP_TTL,
|
|
- OPT_TCP_TIMESTAMP, OPT_TR_STOP, OPT_TR_NO_RTT, OPT_ICMP_HELP,
|
|
+ OPT_TCP_TIMESTAMP, OPT_TCP_MSS, OPT_TR_STOP, OPT_TR_NO_RTT, OPT_ICMP_HELP,
|
|
OPT_RAND_DEST, OPT_RAND_SOURCE, OPT_LSRR, OPT_SSRR, OPT_ROUTE_HELP,
|
|
OPT_ICMP_IPSRC, OPT_ICMP_IPDST, OPT_ICMP_SRCPORT, OPT_ICMP_DSTPORT,
|
|
- OPT_ICMP_GW, OPT_FORCE_ICMP, OPT_APD_SEND, OPT_SCAN, OPT_FASTER };
|
|
+ OPT_ICMP_GW, OPT_FORCE_ICMP, OPT_APD_SEND, OPT_SCAN, OPT_FASTER,
|
|
+ OPT_FLOOD };
|
|
|
|
static struct ago_optlist hping_optlist[] = {
|
|
{ 'c', "count", OPT_COUNT, AGO_NEEDARG },
|
|
@@ -105,8 +106,10 @@ static struct ago_optlist hping_optlist[
|
|
{ '\0', "tcpexitcode", OPT_TCPEXITCODE, AGO_NOARG },
|
|
{ '\0', "fast", OPT_FAST, AGO_NOARG|AGO_EXCEPT0 },
|
|
{ '\0', "faster", OPT_FASTER, AGO_NOARG|AGO_EXCEPT0 },
|
|
+ { '\0', "flood", OPT_FLOOD, AGO_NOARG|AGO_EXCEPT0 },
|
|
{ '\0', "tr-keep-ttl", OPT_TR_KEEP_TTL, AGO_NOARG },
|
|
{ '\0', "tcp-timestamp",OPT_TCP_TIMESTAMP, AGO_NOARG },
|
|
+ { '\0', "tcp-mss", OPT_TCP_MSS, AGO_NEEDARG|AGO_EXCEPT0 },
|
|
{ '\0', "tr-stop", OPT_TR_STOP, AGO_NOARG },
|
|
{ '\0', "tr-no-rtt", OPT_TR_NO_RTT, AGO_NOARG },
|
|
{ '\0', "rand-dest", OPT_RAND_DEST, AGO_NOARG },
|
|
@@ -503,9 +506,17 @@ int parse_options(int argc, char **argv)
|
|
usec_delay.it_interval.tv_sec = 0;
|
|
usec_delay.it_value.tv_usec =
|
|
usec_delay.it_interval.tv_usec = 1;
|
|
+ break;
|
|
+ case OPT_FLOOD:
|
|
+ opt_flood = TRUE;
|
|
+ break;
|
|
case OPT_TR_KEEP_TTL:
|
|
opt_tr_keep_ttl = TRUE;
|
|
break;
|
|
+ case OPT_TCP_MSS:
|
|
+ opt_tcp_mss = TRUE;
|
|
+ tcp_mss = strtoul(ago_optarg, NULL, 0);
|
|
+ break;
|
|
case OPT_TCP_TIMESTAMP:
|
|
opt_tcp_timestamp = TRUE;
|
|
break;
|