diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-09-21 18:00:10 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-09-21 18:00:10 +0100 |
commit | 265dbe5dbc14c199299496c6db8fce3f76647015 (patch) | |
tree | ab18b5617d138f6684566b619405090989d55a2c /net-analyzer/hping | |
parent | 586819755b4dbfdffdc8a725ab7c0f86095b8489 (diff) |
gentoo resync : 21.09.2018
Diffstat (limited to 'net-analyzer/hping')
8 files changed, 434 insertions, 0 deletions
diff --git a/net-analyzer/hping/Manifest b/net-analyzer/hping/Manifest index c70464fce437..92b867a54855 100644 --- a/net-analyzer/hping/Manifest +++ b/net-analyzer/hping/Manifest @@ -6,6 +6,14 @@ AUX hping-3_pre20051105-strlen.patch 218 BLAKE2B 77d4180b2de3d2eef09413d5e4ce51f AUX hping-3_pre20051105-tcl.patch 260 BLAKE2B b8ad9492a1d4a4ff2b45cdf0263457d16e90da809db8485185602d15d7408fea8b5174a2dbc452ee3749efb70336b4ae015a341a9ec51aa8baf8c792f8bb4202 SHA512 67da303e4c4b225607c76cee7cb2b2655b0dce9f2e151dc64f078cc719fcee974566967b1b294c0bab347a58bbfb6f08e3dad91c692dd1c56878c691ef5b7294 AUX hping-3_pre20051105-tclsh-proper-escaping.patch 550 BLAKE2B 463c740662c2477379df97a795afb58725c30258eadbd4e1e3495b5ffa9e9cc04e5d4eec2a33dfa619d6a4450f79cba4c89463f250cdd7bf50bc1a6ed9f77b68 SHA512 349286fe6e22f491debe399bdf68d99f27c1baaf27bc9fd976691fc8bcb6fcfb03dae09b3796c1e181a0deca279c6e8a0721d39862a302d02bb05d7557b505ab AUX hping-3_pre20051105.patch 1036 BLAKE2B c06043dbd14fd7f7806a9404f5523a3ece4e9af3b619cb19965cc983191f553d28df1bedae0b534029d374fb2bc49ae6c5bff84a6b4f829081e92a1835a90913 SHA512 ab1a6f85d8ba6e91097260b2044502f69033dd7466869cac19d50a1830a9eeea105617ec62e14cebe953b49992a3548c08f243638171de3524cb0058cf6d713e +AUX hping-3_pre20141226-compile.patch 1043 BLAKE2B a58b97bd9404c1c360c5a6604959a91912ac5bc7df9096661cf9bb057d9421ce7170497a97596417547f396f4034dfd587f9e835a82a03c0e352adca656204ea SHA512 bc34affaefddb8515ce3e478b72683937d4a7e64ce7037e827dc957326d652a3c41a6016cf5a25f7f0185316a349d448a87c5f8d343002f833998826f6125c50 +AUX hping-3_pre20141226-hping2-2-hping.patch 9089 BLAKE2B 319a656267ecff667550940ae2c5be2471c6c0308d4750a53f42c698e442119ddb8025ecdd3fd9835e22eef87d53f73d9bd1bb3de89bf523e25a1f1cbd00d9b8 SHA512 a660375853d37e3dfb3a1ad1e09dfbdd70ed88900d4a9d07d32c8d1cc782e2d4e357eb0fdc78b46711b6c8e5bf21b8572bc2e696874cf6f52a3a14d54b395bd6 +AUX hping-3_pre20141226-indent.patch 217 BLAKE2B 7db91fb6ae7585bdcedcf07f5f0373967dcbce4a34785574e9e0392fcee720190f087466dbdd6272102c6280a56a7640c2a2726539ed8dd557d277c4b2d40c76 SHA512 bfb024c3d50a7674969472ac38019d6f06622bbe8a7392c3babd1bb99c3c4c6c5a553cf7a9e1bc7ad9c6636e1fa5d8faca8679df191995b8b76d6c5f6aa936e9 +AUX hping-3_pre20141226-pcap-bpf.patch 421 BLAKE2B ff0b48788abe2151c60ab3a99c8800f817a01f64e3eaa40218c227fb180a1abd1e23cf4c98f689ba8ec7a8ac5ac2698a574d0264b64c9d8edf1bc8729309ed5a SHA512 58b493b860a8fb702292faf17bb6d033a855748dcb7db173025ba7ca54a1ecd8e8f9bfa32e0c36a3988c38baec2757b99be12afae052196d338ee24f3100a975 +AUX hping-3_pre20141226-scan-overflow.patch 316 BLAKE2B 7d43d98fe736dc78a2e104c0daa0d206dd30175c8133168fc390b308c3889cf306bcbc1c10265474bbd9397694585b9b16667ca80d91d1175b2daa41aa9ba501 SHA512 ddef839e98f48de04aac8015468808d1e3201f0752cb82a4650e35c27a903d2ceca0603415d8a19f39dd827a8ca249d778312a0f272a4605b3ea67af4a18846b +AUX hping-3_pre20141226-unused-but-set.patch 1272 BLAKE2B 8ae0bfad0bab0c8f0f7592b5ec370ebe146bb31c2dd5a53651d2bd27441c605114f46ab98ec9a97e9f5d386cae5a561c80c420c4c15d6d9424440ac4a53736ef SHA512 a9f031c39a448b0d1f6b076193a07c7a9628756af46a06c2f0d8a2859a02e55bbff5ae55ee4341297b19c4e1ba041b5dd2cdee9b64bdf35e6aff5dc4b8faf6db +DIST hping-3_pre20141226.zip 648502 BLAKE2B 4c75bdb886a37180a4561a8179e00ea5bb6534e32b6fa749cd53824e36dfbeaa38b1a772b58f61d68056f510a294f6c3363f56705adb75f42fec11f4f4cd8fa1 SHA512 33ca573d66d7f6285f69a060f56a95e7307bc24d6c81b5e1752c72b8487ab9c85ac6e4499f9c4897e2656a67e12d608a0a149ca5502bdcf18cf97c88d4a2309b DIST hping3-20051105.tar.gz 584001 BLAKE2B b99b7d2310e1706926ec5c649cd03a8889e3cff36f2a8e1f899799ddb1f4e6e432ab2b83c82b741ab827f715dbf8649a94831e75ef22793c7730e80d49c576c1 SHA512 3b3faa836e70054c8f9f004d876b7eb5f668b64826a6aaf8ca3685619111d9df4eb494a7d38b83cea6cb5f0bd164956461039bf4f73f7c7e90d80cede639b2b3 EBUILD hping-3_pre20051105-r6.ebuild 1597 BLAKE2B 4ea4ceffe2ddfc9be4e333c282c4f76d820a560f37450359d5b73096a2bef5d03ccc057f9f63740fb6930d433e9723382ad3306a075ea39352ea854fc94da089 SHA512 22f7aa3764f5d91779ab281bd0a173fc8dffad1f61a8886b82d7b0716fe7b36d1d01eb5ae59452859807f3d6dd50cc7d496893140a60dff9b9be09f60d940617 +EBUILD hping-3_pre20141226.ebuild 1522 BLAKE2B 9b69e1a45466607d39a4b79feab0b68017519d52139583e2900959bec47a46506a22e918ed85f88c35f94bf8a86de837f8b1198227b7b751e4f3e687abfede5e SHA512 a971eff457c48e4ef62090ce15633483e9957eee5e37e17564376a23fdc748ae64929eed44ad756819d48636a1e173ff922e2abdcda6847ff387cf2386352414 MISC metadata.xml 276 BLAKE2B e21811549278e73aa9a14acfe242fd022106a39ac1300caa00615772d7f54d08a433052659a271f9ac0d453c7776fc2b9e8d86e6d3f637817c214174dde52cb2 SHA512 f0e6c6bc89659e01e157d9bf30d0a2f3fd2d71bc26c8d12489c4a44fc5237159946e25b46e7295ab4676aea63559194977a0b1e76aced31d81cf6387dd0f4250 diff --git a/net-analyzer/hping/files/hping-3_pre20141226-compile.patch b/net-analyzer/hping/files/hping-3_pre20141226-compile.patch new file mode 100644 index 000000000000..14b6eacdae47 --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20141226-compile.patch @@ -0,0 +1,31 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -6,10 +6,7 @@ + # $date: Sun Jul 25 17:56:15 MET DST 1999$ + # $rev: 3$ + +-CC= gcc +-AR=/usr/bin/ar +-RANLIB=/usr/bin/ranlib +-CCOPT= -O2 -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@ ++CCOPT= $(CFLAGS) -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@ + DEBUG= -g + #uncomment the following if you need libpcap based build under linux + #(not raccomanded) +@@ -50,14 +47,11 @@ + $(RANLIB) $@ + + hping3: byteorder.h $(OBJ) +- $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ ++ $(CC) -o hping3 $(CCOPT) $(LDFLAGS) $(DEBUG) $(OBJ) -L/usr/$(LIBDIR) $(PCAP) @SOLARISLIB@ @TCL_LIB@ + @echo +- ./hping3 -v +- @echo "use \`make strip' to strip hping3 binary" +- @echo "use \`make install' to install hping3" + + hping3-static: byteorder.h $(OBJ) +- $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl ++ $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/$(LIBDIR) $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl + + byteorder.h: + ./configure diff --git a/net-analyzer/hping/files/hping-3_pre20141226-hping2-2-hping.patch b/net-analyzer/hping/files/hping-3_pre20141226-hping2-2-hping.patch new file mode 100644 index 000000000000..7ceaac921a0b --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20141226-hping2-2-hping.patch @@ -0,0 +1,240 @@ +--- a/docs/hping3.8 ++++ b/docs/hping3.8 +@@ -1,8 +1,8 @@ +-.TH HPING2 8 "2001 Aug 14" ++.TH HPING 8 "2001 Aug 14" + .SH NAME +-hping2 \- send (almost) arbitrary TCP/IP packets to network hosts ++hping \- send (almost) arbitrary TCP/IP packets to network hosts + .SH SYNOPSIS +-.B hping2 ++.B hping + [ + .B \-hvnqVDzZ012WrfxykQbFSRPAUXYjJBuTG + ] [ +@@ -116,11 +116,11 @@ + .br + .ad + .SH DESCRIPTION +-hping2 is a network tool able to send custom TCP/IP packets and to +-display target replies like ping program does with ICMP replies. hping2 ++hping is a network tool able to send custom TCP/IP packets and to ++display target replies like ping program does with ICMP replies. hping + handle fragmentation, arbitrary packets body and size and can be used in + order to transfer files encapsulated under supported protocols. Using +-hping2 you are able to perform at least the following stuff: ++hping you are able to perform at least the following stuff: + + - Test firewall rules + - Advanced port scanning +@@ -136,7 +136,7 @@ + - A lot of others. + + .IR "It's also a good didactic tool to learn TCP/IP" . +-hping2 is developed and maintained by antirez@invece.org and is ++hping is developed and maintained by antirez@invece.org and is + licensed under GPL version 2. Development is open so you can send + me patches, suggestion and affronts without inhibitions. + .SH HPING SITE +@@ -158,9 +158,9 @@ + .I -c --count count + Stop after sending (and receiving) + .I count +-response packets. After last packet was send hping2 wait COUNTREACHED_TIMEOUT ++response packets. After last packet was send hping wait COUNTREACHED_TIMEOUT + seconds target host replies. You are able to tune COUNTREACHED_TIMEOUT editing +-hping2.h ++hping.h + .TP + .I -i --interval + Wait +@@ -171,10 +171,10 @@ + .I wait + to X micro seconds. + The default is to wait +-one second between each packet. Using hping2 to transfer files tune this ++one second between each packet. Using hping to transfer files tune this + option is really important in order to increase transfer rate. Even using +-hping2 to perform idle/spoofing scanning you should tune this option, see +-.B HPING2-HOWTO ++hping to perform idle/spoofing scanning you should tune this option, see ++.B HPING-HOWTO + for more information. + .TP + .I --fast +@@ -195,13 +195,13 @@ + startup time and when finished. + .TP + .I -I --interface interface name +-By default on linux and BSD systems hping2 uses default routing interface. ++By default on linux and BSD systems hping uses default routing interface. + In other systems or when there is no default route +-hping2 uses the first non-loopback interface. +-However you are able to force hping2 to use the interface you need using ++hping uses the first non-loopback interface. ++However you are able to force hping to use the interface you need using + this option. Note: you don't need to specify the whole name, for + example -I et will match eth0 ethernet0 myet1 et cetera. If no interfaces +-match hping2 will try to use lo. ++match hping will try to use lo. + .TP + .I -V --verbose + Enable verbose output. TCP replies will be shown as follows: +@@ -211,7 +211,7 @@ + .TP + .I -D --debug + Enable debug mode, it's useful when you experience some problem with +-hping2. When debug mode is enabled you will get more information about ++hping. When debug mode is enabled you will get more information about + .B interface detection, data link layer access, interface settings, options + .B parsing, fragmentation, HCMP protocol + and other stuff. +@@ -223,30 +223,30 @@ + CTRL+Z once or twice. + .TP + .I -Z --unbind +-Unbind CTRL+Z so you will able to stop hping2. ++Unbind CTRL+Z so you will able to stop hping. + .TP + .I --beep + Beep for every matching received packet (but not for ICMP errors). + .SH PROTOCOL SELECTION +-Default protocol is TCP, by default hping2 will send tcp headers to target ++Default protocol is TCP, by default hping will send tcp headers to target + host's port 0 with a winsize of 64 without any tcp flag on. Often this + is the best way to do an 'hide ping', useful when target is behind + a firewall that drop ICMP. Moreover a tcp null-flag to port 0 has a good + probability of not being logged. + .TP + .I -0 --rawip +-RAW IP mode, in this mode hping2 will send IP header with data ++RAW IP mode, in this mode hping will send IP header with data + appended with --signature and/or --file, see also --ipproto that + allows you to set the ip protocol field. + .TP + .I -1 --icmp +-ICMP mode, by default hping2 will send ICMP echo-request, you can set ++ICMP mode, by default hping will send ICMP echo-request, you can set + other ICMP type/code using + .B --icmptype --icmpcode + options. + .TP + .I -2 --udp +-UDP mode, by default hping2 will send udp to target host's port 0. ++UDP mode, by default hping will send udp to target host's port 0. + UDP header tunable options are the following: + .B --baseport, --destport, --keep. + .TP +@@ -288,11 +288,11 @@ + shows interesting details. + .TP + .I -9 --listen signature +-HPING2 listen mode, using this option hping2 waits for packet that contain ++HPING listen mode, using this option hping waits for packet that contain + .I signature + and dump from + .I signature +-end to packet's end. For example if hping2 --listen TEST reads a packet ++end to packet's end. For example if hping --listen TEST reads a packet + that contain + .B 234-09sdflkjs45-TESThello_world + it will display +@@ -304,7 +304,7 @@ + ensures that target will not gain your real address. However replies + will be sent to spoofed address, so you will can't see them. In order + to see how it's possible to perform spoofed/idle scanning see the +-.BR HPING2-HOWTO . ++.BR HPING-HOWTO . + .TP + .I --rand-source + This option enables the +@@ -347,7 +347,7 @@ + or + .B --bind + options. If in doubt try +-.BR "" "`" "hping2 some.host.com -t 1 --traceroute" "'." ++.BR "" "`" "hping some.host.com -t 1 --traceroute" "'." + .TP + .I -N --id + Set ip->id field. Default id is random but if fragmentation is turned on +@@ -361,11 +361,11 @@ + .I -W --winid + id from Windows* systems before Win2k has different byte ordering, if this + option is enable +-hping2 will properly display id replies from those Windows. ++hping will properly display id replies from those Windows. + .TP + .I -r --rel + Display id increments instead of id. See the +-.B HPING2-HOWTO ++.B HPING-HOWTO + for more information. Increments aren't computed as id[N]-id[N-1] but + using packet loss compensation. See relid.c for more information. + .TP +@@ -445,7 +445,7 @@ + .SH TCP/UDP RELATED OPTIONS + .TP + .I -s --baseport source port +-hping2 uses source port in order to guess replies sequence number. It ++hping uses source port in order to guess replies sequence number. It + starts with a base source port number, and increase this number for each + packet sent. When packet is received sequence number can be computed as + .IR "replies.dest.port - base.source.port" . +@@ -485,7 +485,7 @@ + by target host. This can be useful when you need to analyze whether + TCP sequence number is predictable. Output example: + +-.B #hping2 win98 --seqnum -p 139 -S -i u1 -I eth0 ++.B #hping win98 --seqnum -p 139 -S -i u1 -I eth0 + .nf + HPING uaz (eth0 192.168.4.41): S set, 40 headers + 0 data bytes + 2361294848 +2361294848 +@@ -540,8 +540,8 @@ + .SH COMMON OPTIONS + .TP + .I -d --data data size +-Set packet body size. Warning, using --data 40 hping2 will not generate +-0 byte packets but protocol_header+40 bytes. hping2 will display ++Set packet body size. Warning, using --data 40 hping will not generate ++0 byte packets but protocol_header+40 bytes. hping will display + packet size information as first line output, like this: + .B HPING www.yahoo.com (ppp0 204.71.200.67): NO FLAGS are set, 40 headers + 40 data bytes + .TP +@@ -577,9 +577,9 @@ + A to host B you may use the following: + .nf + .I [host_a] +-.B # hping2 host_b --udp -p 53 -d 100 --sign signature --safe --file /etc/passwd ++.B # hping host_b --udp -p 53 -d 100 --sign signature --safe --file /etc/passwd + .I [host_b] +-.B # hping2 host_a --listen signature --safe --icmp ++.B # hping host_a --listen signature --safe --icmp + .fi + .TP + .I -u --end +@@ -587,13 +587,13 @@ + .I --file filename + option, tell you when EOF has been reached. Moreover prevent that other end + accept more packets. Please, for more information see the +-.BR HPING2-HOWTO . ++.BR HPING-HOWTO . + .TP + .I -T --traceroute +-Traceroute mode. Using this option hping2 will increase ttl for each ++Traceroute mode. Using this option hping will increase ttl for each + .B ICMP time to live 0 during transit + received. Try +-.BR "hping2 host --traceroute" . ++.BR "hping host --traceroute" . + This option implies --bind and --ttl 1. You can override the ttl of 1 + using the --ttl option. Since 2.0.0 stable it prints RTT information. + .TP +@@ -601,7 +601,7 @@ + Keep the TTL fixed in traceroute mode, so you can monitor just one hop + in the route. For example, to monitor how the 5th hop changes or + how its RTT changes you can try +-.BR "hping2 host --traceroute --ttl 5 --tr-keep-ttl" . ++.BR "hping host --traceroute --ttl 5 --tr-keep-ttl" . + .TP + .I --tr-stop + If this option is specified hping will exit once the first packet diff --git a/net-analyzer/hping/files/hping-3_pre20141226-indent.patch b/net-analyzer/hping/files/hping-3_pre20141226-indent.patch new file mode 100644 index 000000000000..1f8952d1b3b7 --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20141226-indent.patch @@ -0,0 +1,13 @@ +--- a/rtt.c ++++ b/rtt.c +@@ -45,8 +45,8 @@ + tablepos = i; + break; + } +- if (i != TABLESIZE) +- *seqp = delaytable[i].seq; ++ if (i != TABLESIZE) ++ *seqp = delaytable[i].seq; + } + + if (tablepos != -1) diff --git a/net-analyzer/hping/files/hping-3_pre20141226-pcap-bpf.patch b/net-analyzer/hping/files/hping-3_pre20141226-pcap-bpf.patch new file mode 100644 index 000000000000..698e404f79ea --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20141226-pcap-bpf.patch @@ -0,0 +1,24 @@ +--- a/libpcap_stuff.c ++++ b/libpcap_stuff.c +@@ -16,8 +16,8 @@ + #include <string.h> + #include <stdlib.h> + #include <sys/ioctl.h> +-#include <net/bpf.h> + #include <pcap.h> ++#include <pcap-bpf.h> + + #include "globals.h" + +--- a/script.c ++++ b/script.c +@@ -23,8 +23,8 @@ + #include <sched.h> + + #include <sys/ioctl.h> +-#include <net/bpf.h> + #include <pcap.h> ++#include <pcap-bpf.h> + + #include "release.h" + #include "hping2.h" diff --git a/net-analyzer/hping/files/hping-3_pre20141226-scan-overflow.patch b/net-analyzer/hping/files/hping-3_pre20141226-scan-overflow.patch new file mode 100644 index 000000000000..ae3df1e54434 --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20141226-scan-overflow.patch @@ -0,0 +1,11 @@ +--- a/scan.c ++++ b/scan.c +@@ -456,7 +456,7 @@ + continue; + /* time to copy headers in a safe place */ + p = (unsigned char*) packet+linkhdr_size+iphdrlen; +- memcpy(&icmp, p, sizeof(subtcp)); ++ memcpy(&icmp, p, sizeof(icmp)); + p += sizeof(icmp); + memcpy(&subip, p, sizeof(ip)); + p += sizeof(ip); diff --git a/net-analyzer/hping/files/hping-3_pre20141226-unused-but-set.patch b/net-analyzer/hping/files/hping-3_pre20141226-unused-but-set.patch new file mode 100644 index 000000000000..887b90efad93 --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20141226-unused-but-set.patch @@ -0,0 +1,45 @@ +--- a/apd.c ++++ b/apd.c +@@ -893,6 +893,7 @@ + return -ARS_ERROR; + err = ars_push_data(pkt, layer, binary, blen); + free(binary); ++ return err; + } else if (strcasecmp(f, "uint32") == 0) { + int err; + __u32 t, nt; +--- a/ars.c ++++ b/ars.c +@@ -906,15 +906,17 @@ + * system isn't FreeBSD or NetBSD. */ + int ars_bsd_fix(struct ars_packet *pkt, unsigned char *packet, size_t size) + { ++#if defined OSTYPE_DARWIN || defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI + struct ars_iphdr *ip; ++#endif + + if (pkt->p_layer[0].l_type != ARS_TYPE_IP || + size < sizeof(struct ars_iphdr)) { + ars_set_error(pkt, "BSD fix requested, but layer 0 not IP"); + return -ARS_INVALID; + } +- ip = (struct ars_iphdr*) packet; + #if defined OSTYPE_DARWIN || defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI ++ ip = (struct ars_iphdr*) packet; + ip->tot_len = ntohs(ip->tot_len); + ip->frag_off = ntohs(ip->frag_off); + #endif +--- a/libpcap_stuff.c ++++ b/libpcap_stuff.c +@@ -23,9 +23,11 @@ + + int open_pcap() + { ++#if (!defined OSTYPE_LINUX) && (!defined __sun__) + int on; + + on = 1; /* no warning if BIOCIMMEDIATE will not be compiled */ ++#endif + if (opt_debug) + printf("DEBUG: pcap_open_live(%s, 99999, 0, 1, %p)\n", + ifname, errbuf); diff --git a/net-analyzer/hping/hping-3_pre20141226.ebuild b/net-analyzer/hping/hping-3_pre20141226.ebuild new file mode 100644 index 000000000000..72c3c7249331 --- /dev/null +++ b/net-analyzer/hping/hping-3_pre20141226.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils multilib toolchain-funcs + +DESCRIPTION="A ping-like TCP/IP packet assembler/analyzer" +HOMEPAGE="http://www.hping.org" +HPING_COMMIT="3547c7691742c6eaa31f8402e0ccbb81387c1b99" +SRC_URI="https://github.com/antirez/${PN}/archive/${HPING_COMMIT}.zip -> ${P}.zip" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~sparc ~x86" +IUSE="tcl" + +S=${WORKDIR}/${PN}-${HPING_COMMIT} + +DEPEND=" + net-libs/libpcap + tcl? ( dev-lang/tcl:0= ) +" +RDEPEND=" + ${DEPEND} +" +PATCHES=( + "${FILESDIR}"/${PN}-3_pre20051105-libtcl.patch + "${FILESDIR}"/${PN}-3_pre20051105-tcl.patch + "${FILESDIR}"/${PN}-3_pre20051105-tclsh-proper-escaping.patch + "${FILESDIR}"/${PN}-3_pre20141226-compile.patch + "${FILESDIR}"/${PN}-3_pre20141226-hping2-2-hping.patch + "${FILESDIR}"/${PN}-3_pre20141226-indent.patch + "${FILESDIR}"/${PN}-3_pre20141226-pcap-bpf.patch + "${FILESDIR}"/${PN}-3_pre20141226-scan-overflow.patch + "${FILESDIR}"/${PN}-3_pre20141226-unused-but-set.patch +) + +src_configure() { + tc-export CC + + # Not an autotools type configure: + sh configure $(usex tcl '' --no-tcl) || die +} + +src_compile() { + emake \ + DEBUG="" \ + "CFLAGS=${CFLAGS}" \ + "AR=$(tc-getAR)" \ + "RANLIB=$(tc-getRANLIB)" \ + "LIBDIR=$(get_libdir)" +} + +src_install () { + dosbin hping3 + dosym hping3 /usr/sbin/hping + dosym hping3 /usr/sbin/hping2 + + newman docs/hping3.8 hping.8 + + dodoc AUTHORS BUGS CHANGES INSTALL NEWS README TODO +} |