gnu: Add wl-clipboard.
[jackhill/guix/guix.git] / gnu / packages / networking.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015, 2016, 2017 Stefan Reichör <stefan@xsteve.at>
6 ;;; Copyright © 2016 Raimon Grau <raimonster@gmail.com>
7 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
9 ;;; Copyright © 2016, 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
10 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
11 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
12 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
13 ;;; Copyright © 2016 Benz Schenk <benz.schenk@uzh.ch>
14 ;;; Copyright © 2016, 2017 Pjotr Prins <pjotr.guix@thebird.nl>
15 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
16 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
17 ;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
19 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
20 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
21 ;;; Copyright © 2018 Adam Van Ymeren <adam@vany.ca>
22 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
23 ;;; Copyright © 2018 Tonton <tonton@riseup.net>
24 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
25 ;;; Copyright © 2018 Theodoros Foradis <theodoros@foradis.org>
26 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
27 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
28 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
29 ;;;
30 ;;; This file is part of GNU Guix.
31 ;;;
32 ;;; GNU Guix is free software; you can redistribute it and/or modify it
33 ;;; under the terms of the GNU General Public License as published by
34 ;;; the Free Software Foundation; either version 3 of the License, or (at
35 ;;; your option) any later version.
36 ;;;
37 ;;; GNU Guix is distributed in the hope that it will be useful, but
38 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
39 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40 ;;; GNU General Public License for more details.
41 ;;;
42 ;;; You should have received a copy of the GNU General Public License
43 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44
45 (define-module (gnu packages networking)
46 #:use-module ((guix licenses) #:prefix license:)
47 #:use-module (guix packages)
48 #:use-module (guix download)
49 #:use-module (guix git-download)
50 #:use-module (guix build-system cmake)
51 #:use-module (guix build-system glib-or-gtk)
52 #:use-module (guix build-system gnu)
53 #:use-module (guix build-system perl)
54 #:use-module (guix build-system python)
55 #:use-module (gnu packages)
56 #:use-module (gnu packages admin)
57 #:use-module (gnu packages adns)
58 #:use-module (gnu packages algebra)
59 #:use-module (gnu packages audio)
60 #:use-module (gnu packages autotools)
61 #:use-module (gnu packages base)
62 #:use-module (gnu packages bison)
63 #:use-module (gnu packages boost)
64 #:use-module (gnu packages check)
65 #:use-module (gnu packages code)
66 #:use-module (gnu packages compression)
67 #:use-module (gnu packages crypto)
68 #:use-module (gnu packages curl)
69 #:use-module (gnu packages databases)
70 #:use-module (gnu packages dejagnu)
71 #:use-module (gnu packages documentation)
72 #:use-module (gnu packages flex)
73 #:use-module (gnu packages gettext)
74 #:use-module (gnu packages glib)
75 #:use-module (gnu packages gnome)
76 #:use-module (gnu packages gnupg)
77 #:use-module (gnu packages gtk)
78 #:use-module (gnu packages image)
79 #:use-module (gnu packages libidn)
80 #:use-module (gnu packages linux)
81 #:use-module (gnu packages lua)
82 #:use-module (gnu packages multiprecision)
83 #:use-module (gnu packages kerberos)
84 #:use-module (gnu packages ncurses)
85 #:use-module (gnu packages pcre)
86 #:use-module (gnu packages perl)
87 #:use-module (gnu packages perl-check)
88 #:use-module (gnu packages pkg-config)
89 #:use-module (gnu packages python)
90 #:use-module (gnu packages python-web)
91 #:use-module (gnu packages qt)
92 #:use-module (gnu packages readline)
93 #:use-module (gnu packages ssh)
94 #:use-module (gnu packages textutils)
95 #:use-module (gnu packages tls)
96 #:use-module (gnu packages valgrind)
97 #:use-module (gnu packages wm)
98 #:use-module (gnu packages wxwidgets)
99 #:use-module (gnu packages xml)
100 #:use-module (ice-9 match))
101
102 ;; The gnu.org ‘home’ for this GNU project is a directory listing with 1.6.0 as
103 ;; the latest version. The author's git repository, mentioned in the 1.6.0
104 ;; README and otherwise legit-looking, contains a proper 1.7.0 release tarball
105 ;; with many OUI updates. Use it, even though it's also several years old now.
106 (define-public macchanger
107 (package
108 (name "macchanger")
109 (version "1.7.0")
110 (source
111 (origin
112 (method url-fetch)
113 (uri (string-append "https://github.com/alobbs/macchanger/"
114 "releases/download/" version "/"
115 name "-" version ".tar.gz"))
116 (sha256
117 (base32 "1gs5m0jxyprdp00w2qkbnaqm3ilkjz0q1gqdg4nzdm8g4xy73qns"))))
118 (build-system gnu-build-system)
119 (home-page "https://www.gnu.org/software/macchanger/")
120 (synopsis "Viewing and manipulating MAC addresses of network interfaces")
121 (description "GNU MAC Changer is a utility for viewing and changing MAC
122 addresses of networking devices. New addresses may be set explicitly or
123 randomly. They can include MAC addresses of the same or other hardware vendors
124 or, more generally, MAC addresses of the same category of hardware.")
125 (license license:gpl2+)))
126
127 (define-public miredo
128 (package
129 (name "miredo")
130 (version "1.2.6")
131 (source (origin
132 (method url-fetch)
133 (uri (string-append "http://www.remlab.net/files/miredo/miredo-"
134 version ".tar.xz"))
135 (sha256
136 (base32
137 "0j9ilig570snbmj48230hf7ms8kvcwi2wblycqrmhh85lksd49ps"))))
138 (build-system gnu-build-system)
139 (arguments
140 '(#:phases
141 (modify-phases %standard-phases
142 ;; The checkconf test in src/ requires network access.
143 (add-before
144 'check 'disable-checkconf-test
145 (lambda _
146 (substitute* "src/Makefile"
147 (("^TESTS = .*") "TESTS = \n"))
148 #t)))))
149 (home-page "http://www.remlab.net/miredo/")
150 (synopsis "Teredo IPv6 tunneling software")
151 (description
152 "Miredo is an implementation (client, relay, server) of the Teredo
153 specification, which provides IPv6 Internet connectivity to IPv6 enabled hosts
154 residing in IPv4-only networks, even when they are behind a NAT device.")
155 (license license:gpl2+)))
156
157 (define-public socat
158 (package
159 (name "socat")
160 (version "1.7.3.2")
161 (source (origin
162 (method url-fetch)
163 (uri (string-append
164 "http://www.dest-unreach.org/socat/download/socat-"
165 version ".tar.bz2"))
166 (sha256
167 (base32
168 "0lcj6zpra33xhgvhmz9l3cqz10v8ybafb8dd1yqkwf1rhy01ymp3"))))
169 (build-system gnu-build-system)
170 (arguments '(#:tests? #f)) ;no 'check' phase
171 (inputs `(("openssl" ,openssl)))
172 (home-page "http://www.dest-unreach.org/socat/")
173 (synopsis
174 "Open bidirectional communication channels from the command line")
175 (description
176 "socat is a relay for bidirectional data transfer between two independent
177 data channels---files, pipes, devices, sockets, etc. It can create
178 \"listening\" sockets, named pipes, and pseudo terminals.
179
180 socat can be used, for instance, as TCP port forwarder, as a shell interface
181 to UNIX sockets, IPv6 relay, for redirecting TCP oriented programs to a serial
182 line, to logically connect serial lines on different computers, or to
183 establish a relatively secure environment (su and chroot) for running client
184 or server shell scripts with network connections.")
185 (license license:gpl2)))
186
187 (define-public tcp-wrappers
188 (package
189 (name "tcp-wrappers")
190 (version "7.6")
191 (source (origin
192 (method url-fetch)
193 (uri (string-append
194 "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_"
195 version ".tar.gz"))
196 (sha256
197 (base32
198 "0p9ilj4v96q32klavx0phw9va21fjp8vpk11nbh6v2ppxnnxfhwm"))))
199 (build-system gnu-build-system)
200 (arguments
201 `(#:phases
202 (modify-phases %standard-phases
203 (delete 'configure) ; there is no configure script
204 (delete 'check) ; there are no tests
205 (replace 'build
206 (lambda _
207 (chmod "." #o755)
208 ;; Upstream doesn't generate a shared library. So we have to do it.
209 (setenv "CC" "gcc -fno-builtin -fPIC")
210 (substitute* "Makefile"
211 (("^(all[^\n]*)" line) (string-append line " libwrap.so\n
212 libwrap.so: $(LIB_OBJ)\n
213 \tgcc -shared $^ -o $@\n")))
214 ;; Deal with some gcc breakage.
215 (substitute* "percent_m.c"
216 (("extern char .sys_errlist.*;") ""))
217 (substitute* "scaffold.c"
218 (("extern char .malloc.*;") ""))
219 ;; This, believe it or not, is the recommended way to build!
220 (invoke "make" "REAL_DAEMON_DIR=/etc" "linux")))
221 ;; There is no make install stage, so we have to do it ourselves.
222 (replace 'install
223 (lambda _
224 (let ((out (assoc-ref %outputs "out"))
225 (man-pages `("hosts_access.3"
226 "hosts_access.5"
227 "hosts_options.5"
228 "tcpd.8"
229 "tcpdchk.8"
230 "tcpdmatch.8"))
231 (libs `("libwrap.a"
232 "libwrap.so"))
233 (headers `("tcpd.h"))
234 (bins `("safe_finger"
235 "tcpd"
236 "tcpdchk"
237 "tcpdmatch"
238 "try-from")))
239 (for-each
240 (lambda (x)
241 (install-file x (string-append out "/include")))
242 headers)
243 (for-each
244 (lambda (x)
245 (install-file x (string-append out "/share/man/man"
246 (string-take-right x 1))))
247 man-pages)
248 (for-each
249 (lambda (x)
250 (install-file x (string-append out "/lib/")))
251 libs)
252 (for-each
253 (lambda (x)
254 (install-file x (string-append out "/bin/")))
255 bins))
256 #t)))))
257 (home-page "http://www.porcupine.org")
258 (synopsis "Monitor and filter incoming requests for network services")
259 (description "With this package you can monitor and filter incoming requests for
260 network services. It includes a library which may be used by daemons to
261 transparently check connection attempts against an access control list.")
262 (license (license:non-copyleft "file://DISCLAIMER"
263 "See the file DISCLAIMER in the distribution."))))
264
265
266 (define-public zeromq
267 (package
268 (name "zeromq")
269 (version "4.0.7")
270 (source (origin
271 (method url-fetch)
272 (uri (string-append "http://download.zeromq.org/zeromq-"
273 version ".tar.gz"))
274 (sha256
275 (base32
276 "00vvwhgcdr1lva2pavicvy92iad0hj8cf71n702hv6blw1kjj2z0"))))
277 (build-system gnu-build-system)
278 (home-page "http://zeromq.org")
279 (synopsis "Library for message-based applications")
280 (description
281 "The 0MQ lightweight messaging kernel is a library which extends the
282 standard socket interfaces with features traditionally provided by specialized
283 messaging middle-ware products. 0MQ sockets provide an abstraction of
284 asynchronous message queues, multiple messaging patterns, message
285 filtering (subscriptions), seamless access to multiple transport protocols and
286 more.")
287 (license license:lgpl3+)))
288
289 (define-public czmq
290 (package
291 (name "czmq")
292 (version "4.1.1")
293 (source (origin
294 (method url-fetch)
295 (uri (string-append
296 "https://github.com/zeromq/" name
297 "/releases/download/v" version
298 "/" name "-" version ".tar.gz"))
299 (sha256
300 (base32
301 "1h5hrcsc30fcwb032vy5gxkq4j4vv1y4dj460rfs1hhxi0cz83zh"))))
302 (build-system gnu-build-system)
303 (arguments
304 '(;; TODO Tests fail for some reason:
305 ;; * zauth: OK
306 ;; * zbeacon: OK (skipping test, no UDP broadcasting)
307 ;; E: (czmq_selftest) 18-02-24 16:25:52 No broadcast interface found, (ZSYS_INTERFACE=lo)
308 ;; make[2]: *** [Makefile:2245: check-local] Segmentation fault
309 ;; make[2]: Leaving directory '/tmp/guix-build-czmq-4.1.0.drv-0/czmq-4.1.0'
310 ;; make[1]: *** [Makefile:2032: check-am] Error 2
311 ;; make[1]: Leaving directory '/tmp/guix-build-czmq-4.1.0.drv-0/czmq-4.1.0'
312 ;; make: *** [Makefile:1588: check-recursive] Error 1
313 ;; phase `check' failed after 19.4 seconds
314 #:tests? #f
315 #:configure-flags '("--enable-drafts")))
316 (inputs
317 `(("zeromq" ,zeromq)))
318 (home-page "http://zeromq.org")
319 (synopsis "High-level C bindings for ØMQ")
320 (description
321 "czmq provides bindings for the ØMQ core API that hides the differences
322 between different versions of ØMQ.")
323 (license license:mpl2.0)))
324
325 (define-public cppzmq
326 (let ((revision "0")
327 (commit "d9f0f016c07046742738c65e1eb84722ae32d7d4"))
328 (package
329 (name "cppzmq")
330 (version (string-append "4.2.2-" revision "."
331 (string-take commit 7)))
332 (source (origin
333 (method git-fetch)
334 (uri (git-reference
335 (url "https://github.com/zeromq/cppzmq")
336 (commit commit)))
337 (sha256
338 (base32
339 "1gmqlm00y6xpa5m6d4ajq3ww63n2w7h4sy997wj81vcqmqx45b1f"))
340 (file-name (string-append name "-" version "-checkout"))))
341 (build-system cmake-build-system)
342 (arguments '(#:tests? #f)) ; No tests.
343 (native-inputs
344 `(("pkg-config" ,pkg-config)))
345 (inputs
346 `(("zeromq" ,zeromq)))
347 (home-page "http://zeromq.org")
348 (synopsis "C++ bindings for the ØMQ messaging library")
349 (description
350 "This package provides header-only C++ bindings for ØMQ. The header
351 files contain direct mappings of the abstractions provided by the ØMQ C API.")
352 (license license:expat))))
353
354 (define-public librdkafka
355 (package
356 (name "librdkafka")
357 (version "0.9.1")
358 (source (origin
359 (method url-fetch)
360 (uri (string-append
361 "https://github.com/edenhill/librdkafka/archive/"
362 version ".tar.gz"))
363 (file-name (string-append name "-" version ".tar.gz"))
364 (sha256
365 (base32
366 "10ldx7g7ymmg17snzx78vy4n8ma1rjx0agzi34g15j2fk867xmas"))))
367 (build-system gnu-build-system)
368 (arguments
369 '(#:phases
370 (modify-phases %standard-phases
371 (replace 'configure
372 ;; its custom configure script doesn't understand 'CONFIG_SHELL'.
373 (lambda* (#:key outputs #:allow-other-keys)
374 (let ((out (assoc-ref outputs "out")))
375 ;; librdkafka++.so lacks RUNPATH for librdkafka.so
376 (setenv "LDFLAGS"
377 (string-append "-Wl,-rpath=" out "/lib"))
378 (invoke "./configure"
379 (string-append "--prefix=" out))))))))
380 (native-inputs
381 `(("python" ,python-wrapper)))
382 (propagated-inputs
383 `(("zlib" ,zlib))) ; in the Libs.private field of rdkafka.pc
384 (home-page "https://github.com/edenhill/librdkafka")
385 (synopsis "Apache Kafka C/C++ client library")
386 (description
387 "librdkafka is a C library implementation of the Apache Kafka protocol,
388 containing both Producer and Consumer support.")
389 (license license:bsd-2)))
390
391 (define-public libndp
392 (package
393 (name "libndp")
394 (version "1.7")
395 (source (origin
396 (method url-fetch)
397 (uri (string-append "http://libndp.org/files/"
398 name "-" version ".tar.gz"))
399 (sha256
400 (base32
401 "1dlinhl39va00v55qygjc9ap77yqf7xvn4rwmvdr49xhzzxhlj1c"))))
402 (build-system gnu-build-system)
403 (home-page "http://libndp.org/")
404 (synopsis "Library for Neighbor Discovery Protocol")
405 (description
406 "libndp contains a library which provides a wrapper for IPv6 Neighbor
407 Discovery Protocol. It also provides a tool named ndptool for sending and
408 receiving NDP messages.")
409 (license license:lgpl2.1+)))
410
411 (define-public ethtool
412 (package
413 (name "ethtool")
414 (version "4.17")
415 (source (origin
416 (method url-fetch)
417 (uri (string-append "mirror://kernel.org/software/network/"
418 name "/" name "-" version ".tar.xz"))
419 (sha256
420 (base32
421 "11f5503mgcwjn1q4dvhjiqwnw3zmp2gbhirjvgfr71y72ys1wsy4"))))
422 (build-system gnu-build-system)
423 (home-page "https://www.kernel.org/pub/software/network/ethtool/")
424 (synopsis "Display or change Ethernet device settings")
425 (description
426 "ethtool can be used to query and change settings such as speed,
427 auto-negotiation and checksum offload on many network devices, especially
428 Ethernet devices.")
429 (license license:gpl2)))
430
431 (define-public ifstatus
432 (package
433 (name "ifstatus")
434 (version "1.1.0")
435 (source (origin
436 (method url-fetch)
437 (uri (string-append "mirror://sourceforge/ifstatus/ifstatus/"
438 "ifstatus%20v" version "/ifstatus-v"
439 version ".tar.gz"))
440 (sha256
441 (base32
442 "045cbsq9ps32j24v8y5hpyqxnqn9mpaf3mgvirlhgpqyb9jsia0c"))
443 (modules '((guix build utils)))
444 (snippet
445 '(begin
446 (substitute* "Main.h"
447 (("#include <stdio.h>")
448 "#include <stdio.h>\n#include <stdlib.h>"))
449 #t))))
450 (build-system gnu-build-system)
451 (arguments
452 '(#:tests? #f ; no "check" target
453 #:phases
454 (modify-phases %standard-phases
455 (delete 'configure) ; no configure script
456 (replace 'install
457 (lambda* (#:key outputs #:allow-other-keys)
458 (let* ((out (assoc-ref outputs "out"))
459 (bin (string-append out "/bin")))
460 (mkdir-p bin)
461 (copy-file "ifstatus"
462 (string-append bin "/ifstatus")))
463 #t)))))
464 (inputs `(("ncurses" ,ncurses)))
465 (home-page "http://ifstatus.sourceforge.net/graphic/index.html")
466 (synopsis "Text based network interface status monitor")
467 (description
468 "IFStatus is a simple, easy-to-use program for displaying commonly
469 needed/wanted real-time traffic statistics of multiple network
470 interfaces, with a simple and efficient view on the command line. It is
471 intended as a substitute for the PPPStatus and EthStatus projects.")
472 (license license:gpl2+)))
473
474 (define-public nload
475 (package
476 (name "nload")
477 (version "0.7.4")
478 (source (origin
479 (method url-fetch)
480 (uri (string-append "mirror://sourceforge/nload/nload/" version
481 "/nload-" version ".tar.gz"))
482 (sha256
483 (base32
484 "1rb9skch2kgqzigf19x8bzk211jdfjfdkrcvaqyj89jy2pkm3h61"))))
485 (build-system gnu-build-system)
486 (inputs `(("ncurses" ,ncurses)))
487 (home-page "http://www.roland-riegel.de/nload/")
488 (synopsis "Realtime console network usage monitor")
489 (description
490 "Nload is a console application which monitors network traffic and
491 bandwidth usage in real time. It visualizes the in- and outgoing traffic using
492 two graphs, and provides additional info like total amount of transferred data
493 and min/max network usage.")
494 (license license:gpl2+)))
495
496 (define-public iodine
497 (package
498 (name "iodine")
499 (version "0.7.0")
500 (source (origin
501 (method url-fetch)
502 (uri (string-append "http://code.kryo.se/" name "/"
503 name "-" version ".tar.gz"))
504 (sha256
505 (base32
506 "0gh17kcxxi37k65zm4gqsvbk3aw7yphcs3c02pn1c4s2y6n40axd"))))
507 (build-system gnu-build-system)
508 (arguments
509 '(#:phases
510 (modify-phases %standard-phases
511 (delete 'configure)
512 (add-before 'build 'fix-ifconfig-path
513 ;; This package works only with the net-tools version of ifconfig.
514 (lambda* (#:key inputs #:allow-other-keys)
515 (substitute* "src/tun.c"
516 (("PATH=[^ ]* ")
517 (string-append (assoc-ref inputs "net-tools") "/bin/")))
518 #t))
519 (add-before 'check 'delete-failing-tests
520 ;; Avoid https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802105.
521 (lambda _
522 (substitute* "tests/common.c"
523 (("tcase_add_test\\(tc, \
524 test_parse_format_ipv(4(|_listen_all|_mapped_ipv6)|6)\\);")
525 ""))
526 #t)))
527 #:make-flags (list "CC=gcc"
528 (string-append "prefix=" (assoc-ref %outputs "out")))
529 #:test-target "test"))
530 (inputs `(("net-tools" ,net-tools)
531 ("zlib" ,zlib)))
532 (native-inputs `(("check" ,check)
533 ("pkg-config" ,pkg-config)))
534 (home-page "http://code.kryo.se/iodine/")
535 (synopsis "Tunnel IPv4 data through a DNS server")
536 (description "Iodine tunnels IPv4 data through a DNS server. This
537 can be useful in different situations where internet access is firewalled, but
538 DNS queries are allowed. The bandwidth is asymmetrical, with limited upstream
539 and up to 1 Mbit/s downstream.")
540 ;; src/md5.[ch] is released under the zlib license
541 (license (list license:isc license:zlib))))
542
543 (define-public whois
544 (package
545 (name "whois")
546 (version "5.4.0")
547 (source
548 (origin
549 (method url-fetch)
550 (uri (string-append "mirror://debian/pool/main/w/whois/"
551 name "_" version ".tar.xz"))
552 (sha256
553 (base32
554 "0y73b3z1akni620s1hlrijwdrk95ca1c8csjds48vpd6z86awx9p"))))
555 (build-system gnu-build-system)
556 (arguments
557 `(#:tests? #f ; no test suite
558 #:make-flags (list "CC=gcc"
559 (string-append "prefix=" (assoc-ref %outputs "out")))
560 #:phases
561 (modify-phases %standard-phases
562 (delete 'configure) ; no configure script
563 (add-before 'build 'setenv
564 (lambda _
565 (setenv "HAVE_ICONV" "1")
566 #t)))))
567 (inputs
568 `(("libidn2" ,libidn2)))
569 (native-inputs
570 `(("gettext" ,gettext-minimal)
571 ("perl" ,perl)
572 ("pkg-config" ,pkg-config)))
573 (synopsis "Intelligent client for the WHOIS directory service")
574 (description
575 "whois searches for an object in a @dfn{WHOIS} (RFC 3912) database.
576 It is commonly used to look up the registered users or assignees of an Internet
577 resource, such as a domain name, an IP address block, or an autonomous system.
578 It can automatically select the appropriate server for most queries.
579
580 For historical reasons, this package also includes @command{mkpasswd}, which
581 encrypts passwords using @code{crypt(3)} and is unrelated to the Expect command
582 of the same name.")
583 (home-page "https://github.com/rfc1036/whois")
584 (license license:gpl2+)))
585
586 (define-public wireshark
587 (package
588 (name "wireshark")
589 (version "2.6.5")
590 (source
591 (origin
592 (method url-fetch)
593 (uri (string-append "https://www.wireshark.org/download/src/wireshark-"
594 version ".tar.xz"))
595 (sha256
596 (base32
597 "12j3fw0j8qcr86c1vsz4bsb55j9inp0ll3wjjdvg1cj4hmwmn5ck"))))
598 (build-system gnu-build-system)
599 (inputs `(("c-ares" ,c-ares)
600 ("glib" ,glib)
601 ("gnutls" ,gnutls)
602 ("libcap" ,libcap)
603 ("libgcrypt" ,libgcrypt)
604 ("libnl" ,libnl)
605 ("libpcap" ,libpcap)
606 ("libssh" ,libssh)
607 ("libxml2" ,libxml2)
608 ("lz4" ,lz4)
609 ("lua" ,lua-5.2) ;Lua 5.3 unsupported
610 ("krb5" ,mit-krb5)
611 ("portaudio" ,portaudio)
612 ("qtbase" ,qtbase)
613 ("qtmultimedia" ,qtmultimedia)
614 ("sbc" ,sbc)
615 ("snappy" ,snappy)
616 ("zlib" ,zlib)))
617 (native-inputs `(("perl" ,perl)
618 ("pkg-config" ,pkg-config)
619 ("python" ,python-wrapper)
620 ("qttools" ,qttools)))
621 (arguments
622 `(#:configure-flags
623 (list (string-append "--with-c-ares=" (assoc-ref %build-inputs "c-ares"))
624 (string-append "--with-krb5=" (assoc-ref %build-inputs "krb5"))
625 (string-append "--with-libcap=" (assoc-ref %build-inputs "libcap"))
626 (string-append "--with-libssh=" (assoc-ref %build-inputs "libssh"))
627 (string-append "--with-lua=" (assoc-ref %build-inputs "lua"))
628 (string-append "--with-lz4=" (assoc-ref %build-inputs "lz4"))
629 (string-append "--with-pcap=" (assoc-ref %build-inputs "libpcap"))
630 (string-append "--with-portaudio="
631 (assoc-ref %build-inputs "portaudio"))
632 (string-append "--with-sbc=" (assoc-ref %build-inputs "sbc"))
633 (string-append "--with-snappy=" (assoc-ref %build-inputs "snappy"))
634 (string-append "--with-zlib=" (assoc-ref %build-inputs "zlib")))
635 #:phases
636 (modify-phases %standard-phases
637 (add-after 'unpack 'patch-source
638 (lambda _
639 ;; Fix build against Qt 5.11.
640 (substitute* "ui/qt/packet_format_group_box.cpp"
641 (("#include <QStyle>") "#include <QStyle>
642 #include <QStyleOption>"))
643 (substitute* "ui/qt/time_shift_dialog.cpp"
644 (("#include <ui/time_shift.h>") "#include <ui/time_shift.h>
645 #include <QStyleOption>"))
646 (substitute* "ui/qt/wireless_frame.cpp"
647 (("#include <QProcess>") "#include <QProcess>
648 #include <QAbstractItemView>"))
649 #t)))))
650 (synopsis "Network traffic analyzer")
651 (description "Wireshark is a network protocol analyzer, or @dfn{packet
652 sniffer}, that lets you capture and interactively browse the contents of
653 network frames.")
654 (home-page "https://www.wireshark.org/")
655 (license license:gpl2+)))
656
657 (define-public fping
658 (package
659 (name "fping")
660 (version "4.1")
661 (source
662 (origin
663 (method url-fetch)
664 (uri (string-append "https://fping.org/dist/fping-"
665 version ".tar.gz"))
666 (sha256
667 (base32
668 "0wxbvm480vij8dy4v1pi8f0c7010rx6bidg3qhsvkdf2ijhy4cr7"))))
669 (build-system gnu-build-system)
670 (home-page "https://fping.org/")
671 (synopsis "Send ICMP ECHO_REQUEST packets to network hosts")
672 (description
673 "fping is a ping like program which uses the Internet Control Message
674 Protocol (ICMP) echo request to determine if a target host is responding.
675 fping differs from ping in that you can specify any number of targets on the
676 command line, or specify a file containing the lists of targets to ping.
677 Instead of sending to one target until it times out or replies, fping will
678 send out a ping packet and move on to the next target in a round-robin
679 fashion.")
680 (license license:expat)))
681
682 (define-public gandi.cli
683 (package
684 (name "gandi.cli")
685 (version "1.3")
686 (source
687 (origin
688 (method url-fetch)
689 (uri (pypi-uri name version))
690 (sha256
691 (base32 "0vfzkw1avybjkf6fwqpf5m4kjz4c0qkkmj62f3jd0zx00vh5ly1d"))))
692 (build-system python-build-system)
693 (arguments
694 `(#:phases
695 (modify-phases %standard-phases
696 (add-after 'unpack 'embed-store-file-names
697 (lambda _
698 (substitute* (list "gandi/cli/modules/cert.py"
699 "gandi/cli/tests/commands/test_certificate.py")
700 (("openssl") (which "openssl")))
701 #t))
702 (add-after 'install 'install-documentation
703 ;; The included man page may be outdated but we install it anyway,
704 ;; since it's mentioned in 'gandi --help' and better than nothing.
705 (lambda* (#:key outputs #:allow-other-keys)
706 (let* ((out (assoc-ref outputs "out"))
707 (man1 (string-append out "/share/man/man1")))
708 (mkdir-p man1)
709 (with-output-to-file (string-append man1 "/gandi.1")
710 (lambda _
711 (invoke "rst2man.py" "gandicli.man.rst")))
712 #t))))))
713 (native-inputs
714 `(("python-docutils" ,python-docutils) ; for rst2man.py
715 ("python-pytest-cov" ,python-pytest-cov)
716 ("python-tox" ,python-tox)))
717 (inputs
718 `(("openssl" ,openssl)
719 ("python-click" ,python-click)
720 ("python-ipy" ,python-ipy)
721 ("python-pyyaml" ,python-pyyaml)
722 ("python-requests" ,python-requests)))
723 (home-page "https://cli.gandi.net")
724 (synopsis "Command-line interface to the Gandi.net Web API")
725 (description
726 "This package provides a command-line client (@command{gandi}) to buy,
727 manage, and delete Internet resources from Gandi.net such as domain names,
728 virtual machines, and certificates.")
729 (license license:gpl3+)))
730
731 (define-public httping
732 (package
733 (name "httping")
734 (version "2.5")
735 (source
736 (origin
737 (method url-fetch)
738 (uri (string-append "https://www.vanheusden.com/httping/httping-"
739 version ".tgz"))
740 (sha256
741 (base32
742 "1y7sbgkhgadmd93x1zafqc4yp26ssiv16ni5bbi9vmvvdl55m29y"))))
743 (build-system gnu-build-system)
744 (native-inputs
745 `(("gettext" ,gettext-minimal)))
746 (inputs
747 `(("fftw" ,fftw)
748 ("ncurses" ,ncurses)
749 ("openssl" ,openssl)))
750 (arguments
751 `(#:make-flags (list "CC=gcc"
752 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
753 "PREFIX=")
754 #:tests? #f)) ; no tests
755 (home-page "https://www.vanheusden.com/httping/")
756 (synopsis "Web server latency and throughput monitor")
757 (description
758 "httping measures how long it takes to connect to a web server, send an
759 HTTP(S) request, and receive the reply headers. It is somewhat similar to
760 @command{ping}, but can be used even in cases where ICMP traffic is blocked
761 by firewalls or when you want to monitor the response time of the actual web
762 application stack itself.")
763 (license license:gpl2))) ; with permission to link with OpenSSL
764
765 (define-public httpstat
766 (package
767 (name "httpstat")
768 (version "1.2.1")
769 (source
770 (origin
771 (method url-fetch)
772 (uri (pypi-uri "httpstat" version))
773 (sha256
774 (base32
775 "1chw2nk56vaq87aba012a270k9na06hfx1pfbsrc3jfvlc2kb9hb"))))
776 (build-system python-build-system)
777 (inputs `(("curl" ,curl)))
778 (arguments
779 '(#:phases
780 (modify-phases %standard-phases
781 (add-before 'build 'fix-curl-path
782 (lambda* (#:key inputs #:allow-other-keys)
783 (substitute* "httpstat.py"
784 (("ENV_CURL_BIN.get\\('curl'\\)")
785 (string-append "ENV_CURL_BIN.get('"
786 (assoc-ref inputs "curl")
787 "/bin/curl')")))
788 #t)))))
789 (home-page "https://github.com/reorx/httpstat")
790 (synopsis "Visualize curl statistics")
791 (description
792 "@command{httpstat} is a tool to visualize statistics from the
793 @command{curl} HTTP client. It acts as a wrapper for @command{curl} and
794 prints timing information for each step of the HTTP request (DNS lookup,
795 TCP connection, TLS handshake and so on) in the terminal.")
796 (license license:expat)))
797
798 (define-public bwm-ng
799 (package
800 (name "bwm-ng")
801 (version "0.6.1")
802 (source
803 (origin
804 (method url-fetch)
805 (uri (string-append "https://www.gropp.org/bwm-ng/bwm-ng-"
806 version ".tar.gz"))
807 (sha256
808 (base32
809 "1w0dwpjjm9pqi613i8glxrgca3rdyqyp3xydzagzr5ndc34z6z02"))))
810 (build-system gnu-build-system)
811 (inputs `(("ncurses" ,ncurses)))
812 (synopsis "Console based live network and disk I/O bandwidth monitor")
813 (description "Bandwidth Monitor NG is a small and simple console based
814 live network and disk I/O bandwidth monitor.")
815 (home-page "https://www.gropp.org/?id=projects&sub=bwm-ng")
816 (license license:gpl2)))
817
818 (define-public aircrack-ng
819 (package
820 (name "aircrack-ng")
821 (version "1.3")
822 (source
823 (origin
824 (method url-fetch)
825 (uri (string-append "https://download.aircrack-ng.org/aircrack-ng-"
826 version ".tar.gz"))
827 (sha256
828 (base32
829 "1jl30d0kibc82447fr3lgw75arik0l9729k94z76l7vl51y8mq4a"))))
830 (build-system gnu-build-system)
831 (native-inputs
832 `(("autoconf" ,autoconf)
833 ("automake" ,automake)
834 ("libtool" ,libtool)
835 ("pkg-config" ,pkg-config)
836 ("which" ,which)))
837 (inputs
838 `(("libgcrypt" ,libgcrypt)
839 ("libnl" ,libnl)
840 ("libpcap" ,libpcap)
841 ("ethtool" ,ethtool)
842 ("pcre" ,pcre)
843 ("sqlite" ,sqlite)
844 ("zlib" ,zlib)))
845 (arguments
846 `(#:configure-flags
847 (list "--with-experimental=yes" ; build wesside-ng, etc.
848 "--with-gcrypt") ; openssl's the default
849 #:phases (modify-phases %standard-phases
850 (add-before 'bootstrap 'patch-evalrev
851 (lambda _
852 ;; Called by ./autogen.sh below, before the default
853 ;; ‘patch-shebangs’ phase has had a chance to run.
854 (substitute* "evalrev"
855 (("/bin/sh")
856 (which "sh")))
857 #t))
858 (replace 'bootstrap
859 (lambda _
860 ;; Patch shebangs in generated files before running
861 ;; ./configure.
862 (setenv "NOCONFIGURE" "please")
863 (invoke "bash" "./autogen.sh")))
864 (add-after 'build 'absolutize-tools
865 (lambda* (#:key inputs #:allow-other-keys)
866 (let ((ethtool (string-append (assoc-ref inputs "ethtool")
867 "/sbin/ethtool")))
868 (substitute* "scripts/airmon-ng"
869 (("ethtool ")
870 (string-append ethtool " ")))
871 #t))))))
872 (home-page "https://www.aircrack-ng.org")
873 (synopsis "Assess WiFi network security")
874 (description
875 "Aircrack-ng is a complete suite of tools to assess WiFi network
876 security. It focuses on different areas of WiFi security: monitoring,
877 attacking, testing, and cracking. All tools are command-line driven, which
878 allows for heavy scripting.")
879 (license (list license:gpl2+ license:bsd-3))))
880
881 (define-public perl-data-validate-ip
882 (package
883 (name "perl-data-validate-ip")
884 (version "0.27")
885 (source
886 (origin
887 (method url-fetch)
888 (uri (string-append
889 "mirror://cpan/authors/id/D/DR/DROLSKY/Data-Validate-IP-"
890 version ".tar.gz"))
891 (sha256
892 (base32 "1mmppyzsh1w2z2h86kvzqxy56wxgs62a3kf8nvcnz76bblir5ap1"))))
893 (build-system perl-build-system)
894 (native-inputs
895 `(("perl-test-requires" ,perl-test-requires)))
896 (propagated-inputs
897 `(("perl-netaddr-ip" ,perl-netaddr-ip)))
898 (home-page "https://metacpan.org/release/Data-Validate-IP")
899 (synopsis "IPv4 and IPv6 validation methods")
900 (description
901 "This module provides several IP address validation subroutines that both
902 validate and untaint their input. This includes both basic validation
903 (@code{is_ipv4()} and @code{is_ipv6()}) and special cases like checking whether
904 an address belongs to a specific network or whether an address is public or
905 private (reserved).")
906 (license license:perl-license)))
907
908 (define-public perl-net-dns
909 (package
910 (name "perl-net-dns")
911 (version "1.18")
912 (source
913 (origin
914 (method url-fetch)
915 (uri
916 (list
917 (string-append "https://www.net-dns.org/download/Net-DNS-"
918 version ".tar.gz")
919 (string-append "mirror://cpan/authors/id/N/NL/NLNETLABS/Net-DNS-"
920 version ".tar.gz")))
921 (sha256
922 (base32
923 "1lx902cbvlfl63bqfdrnyavmfwbjvrfdnwgdc1dgs1wpzja19kjj"))))
924 (build-system perl-build-system)
925 (inputs
926 `(("perl-digest-hmac" ,perl-digest-hmac)))
927 (home-page "https://www.net-dns.org/")
928 (synopsis
929 "Perl Interface to the Domain Name System")
930 (description "Net::DNS is the Perl Interface to the Domain Name System.")
931 (license license:x11)))
932
933 (define-public perl-socket6
934 (package
935 (name "perl-socket6")
936 (version "0.29")
937 (source
938 (origin
939 (method url-fetch)
940 (uri (string-append
941 "mirror://cpan/authors/id/U/UM/UMEMOTO/Socket6-"
942 version
943 ".tar.gz"))
944 (sha256
945 (base32
946 "054izici8klfxs8hr5rljib28plijpsfymy99xbzdp047bx1b2a6"))))
947 (build-system perl-build-system)
948 (arguments
949 `(#:phases
950 (modify-phases %standard-phases
951 (replace 'configure
952 (lambda* (#:key outputs #:allow-other-keys)
953 (let* ((out (assoc-ref outputs "out"))
954 (args `("Makefile.PL"
955 ,(string-append "PREFIX=" out)
956 "INSTALLDIRS=site")))
957 (setenv "CONFIG_SHELL" (which "sh"))
958 (apply invoke "perl" args)))))))
959 (home-page "https://metacpan.org/release/Socket6")
960 (synopsis
961 "IPv6 related part of the C socket.h defines and structure manipulators for Perl")
962 (description "Socket6 binds the IPv6 related part of the C socket header
963 definitions and structure manipulators for Perl.")
964 (license license:bsd-3)))
965
966 (define-public perl-net-dns-resolver-programmable
967 (package
968 (name "perl-net-dns-resolver-programmable")
969 (version "v0.003")
970 (source
971 (origin
972 (method url-fetch)
973 (uri (string-append
974 "mirror://cpan/authors/id/J/JM/JMEHNLE/net-dns-resolver-programmable/"
975 "Net-DNS-Resolver-Programmable-" version ".tar.gz"))
976 (sha256
977 (base32
978 "1v3nl2kaj4fs55n1617n53q8sa3mir06898vpy1rq98zjih24h4d"))
979 (patches
980 (search-patches "perl-net-dns-resolver-programmable-fix.patch"))))
981 (build-system perl-build-system)
982 (native-inputs
983 `(("perl-module-build" ,perl-module-build)))
984 (inputs `(("perl-net-dns" ,perl-net-dns)))
985 (home-page
986 "https://metacpan.org/release/Net-DNS-Resolver-Programmable")
987 (synopsis
988 "Programmable DNS resolver class for offline emulation of DNS")
989 (description "Net::DNS::Resolver::Programmable is a programmable DNS resolver for
990 offline emulation of DNS.")
991 (license license:perl-license)))
992
993 (define-public perl-netaddr-ip
994 (package
995 (name "perl-netaddr-ip")
996 (version "4.079")
997 (source
998 (origin
999 (method url-fetch)
1000 (uri (string-append
1001 "mirror://cpan/authors/id/M/MI/MIKER/NetAddr-IP-"
1002 version
1003 ".tar.gz"))
1004 (sha256
1005 (base32
1006 "1rx0dinrz9fk9qcg4rwqq5n1dm3xv2arymixpclcv2q2nzgq4npc"))))
1007 (build-system perl-build-system)
1008 (arguments
1009 `(#:phases
1010 (modify-phases %standard-phases
1011 (replace 'configure
1012 (lambda* (#:key outputs #:allow-other-keys)
1013 (let* ((out (assoc-ref outputs "out"))
1014 (args `("Makefile.PL"
1015 ,(string-append "PREFIX=" out)
1016 "INSTALLDIRS=site")))
1017 (setenv "CONFIG_SHELL" (which "sh"))
1018 (apply invoke "perl" args)))))))
1019 (home-page
1020 "https://metacpan.org/release/NetAddr-IP")
1021 (synopsis
1022 "Manages IPv4 and IPv6 addresses and subnets")
1023 (description "NetAddr::IP manages IPv4 and IPv6 addresses and subsets.")
1024 (license license:perl-license)))
1025
1026 (define-public perl-net-patricia
1027 (package
1028 (name "perl-net-patricia")
1029 (version "1.22")
1030 (source
1031 (origin
1032 (method url-fetch)
1033 (uri (string-append
1034 "mirror://cpan/authors/id/G/GR/GRUBER/Net-Patricia-"
1035 version
1036 ".tar.gz"))
1037 (sha256
1038 (base32
1039 "0ln5f57vc8388kyh9vhx2infrdzfhbpgyby74h1qsnhwds95m0vh"))))
1040 (build-system perl-build-system)
1041 (inputs
1042 `(("perl-net-cidr-lite" ,perl-net-cidr-lite)
1043 ("perl-socket6" ,perl-socket6)))
1044 (home-page
1045 "https://metacpan.org/release/Net-Patricia")
1046 (synopsis
1047 "Patricia Trie Perl module for fast IP address lookups")
1048 (description
1049 "Net::Patricia does IP address lookups quickly in Perl.")
1050 ;; The bindings are licensed under GPL2 or later.
1051 ;; libpatricia is licensed under 2-clause BSD.
1052 (license (list license:gpl2+ license:bsd-2))))
1053
1054 (define-public perl-net-cidr-lite
1055 (package
1056 (name "perl-net-cidr-lite")
1057 (version "0.21")
1058 (source
1059 (origin
1060 (method url-fetch)
1061 (uri (string-append
1062 "mirror://cpan/authors/id/D/DO/DOUGW/Net-CIDR-Lite-"
1063 version
1064 ".tar.gz"))
1065 (sha256
1066 (base32
1067 "14shj73zbqmfjbp0qz1fs9j4p2dpvz5hfkm4qfdjbydflbl2b8fg"))))
1068 (build-system perl-build-system)
1069 (home-page
1070 "https://metacpan.org/release/Net-CIDR-Lite")
1071 (synopsis
1072 "Perl extension for merging IPv4 or IPv6 CIDR addresses")
1073 (description "Net::CIDR::Lite merges IPv4 or IPv6 CIDR addresses.")
1074 (license license:gpl1+)))
1075
1076 ;; TODO: Use the geolite-mirror-simple.pl script from the example
1077 ;; directory to stay current with the databases. How?
1078 (define-public perl-geo-ip
1079 (package
1080 (name "perl-geo-ip")
1081 (version "1.51")
1082 (source
1083 (origin
1084 (method url-fetch)
1085 (uri (string-append
1086 "mirror://cpan/authors/id/M/MA/MAXMIND/Geo-IP-"
1087 version
1088 ".tar.gz"))
1089 (sha256
1090 (base32
1091 "1fka8fr7fw6sh3xa9glhs1zjg3s2gfkhi7n7da1l2m2wblqj0c0n"))))
1092 (build-system perl-build-system)
1093 (home-page "https://metacpan.org/release/Geo-IP")
1094 (synopsis
1095 "Look up location and network information by IP Address in Perl")
1096 (description "The Perl module 'Geo::IP'. It looks up location and network
1097 information by IP Address.")
1098 (license license:perl-license)))
1099
1100 (define-public perl-io-socket-inet6
1101 (package
1102 (name "perl-io-socket-inet6")
1103 (version "2.72")
1104 (source
1105 (origin
1106 (method url-fetch)
1107 (uri (string-append
1108 "mirror://cpan/authors/id/S/SH/SHLOMIF/IO-Socket-INET6-"
1109 version
1110 ".tar.gz"))
1111 (sha256
1112 (base32
1113 "1fqypz6qa5rw2d5y2zq7f49frwra0aln13nhq5gi514j2zx21q45"))))
1114 (build-system perl-build-system)
1115 (native-inputs
1116 `(("perl-module-build" ,perl-module-build)
1117 ("perl-test-pod" ,perl-test-pod)
1118 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1119 (inputs `(("perl-socket6" ,perl-socket6)))
1120 (arguments `(;; Need network socket API
1121 #:tests? #f))
1122 (home-page
1123 "https://metacpan.org/release/IO-Socket-INET6")
1124 (synopsis
1125 "Perl object interface for AF_INET/AF_INET6 domain sockets")
1126 (description "IO::Socket::INET6 is an interface for AF_INET/AF_INET6 domain
1127 sockets in Perl.")
1128 (license license:perl-license)))
1129
1130 (define-public libproxy
1131 (package
1132 (name "libproxy")
1133 (version "0.4.15")
1134 (source (origin
1135 (method url-fetch)
1136 (uri (string-append "https://github.com/libproxy/libproxy/"
1137 "releases/download/" version "/libproxy-"
1138 version ".tar.xz"))
1139 (sha256
1140 (base32
1141 "0kvdrazlzwia876w988cmlypp253gwy6idlh8mjk958c29jb8kb5"))))
1142 (build-system cmake-build-system)
1143 (native-inputs
1144 `(("pkg-config" ,pkg-config)))
1145 (inputs
1146 `(("dbus" ,dbus)
1147 ("zlib" ,zlib)
1148 ("network-manager" ,network-manager)))
1149 (arguments
1150 `(#:phases
1151 (modify-phases %standard-phases
1152 (replace 'check
1153 (lambda _
1154 (invoke "ctest" "-E" "url-test"))))))
1155 (synopsis "Library providing automatic proxy configuration management")
1156 (description "Libproxy handles the details of HTTP/HTTPS proxy
1157 configuration for applications across all scenarios. Applications using
1158 libproxy only have to specify which proxy to use.")
1159 (home-page "https://libproxy.github.io/libproxy")
1160 (license license:lgpl2.1+)))
1161
1162 (define-public proxychains-ng
1163 (package
1164 (name "proxychains-ng")
1165 (version "4.13")
1166 (source
1167 (origin
1168 (method url-fetch)
1169 (uri (string-append "http://ftp.barfooze.de/pub/sabotage/tarballs/"
1170 name "-" version ".tar.xz"))
1171 (sha256
1172 (base32
1173 "0418fv8hgf43rzrxxlybg49jz2h6w8inndhb6v1184k4cwzjnl3p"))))
1174 (build-system gnu-build-system)
1175 (arguments
1176 `(#:tests? #f ; there are no tests
1177 #:phases
1178 (modify-phases %standard-phases
1179 (add-after 'unpack 'fix-configure-script
1180 (lambda _
1181 ;; The configure script is very intolerant to unknown arguments,
1182 ;; such as "CONFIG_SHELL".
1183 (substitute* "configure"
1184 (("\\*\\) break ;;" line)
1185 (string-append "[A-Z]*) shift ;;\n"
1186 line)))
1187 #t))
1188 (add-before 'configure 'set-up-environment
1189 (lambda _
1190 (setenv "CC" "gcc")
1191 #t)))))
1192 (synopsis "Redirect any TCP connection through a proxy or proxy chain")
1193 (description "Proxychains-ng is a preloader which hooks calls to sockets
1194 in dynamically linked programs and redirects them through one or more SOCKS or
1195 HTTP proxies.")
1196 (home-page "https://github.com/rofl0r/proxychains-ng")
1197 (license license:gpl2+)))
1198
1199 (define-public enet
1200 (package
1201 (name "enet")
1202 (version "1.3.13")
1203 (source (origin
1204 (method url-fetch)
1205 (uri (string-append "http://enet.bespin.org/download/"
1206 name "-" version ".tar.gz"))
1207 (sha256
1208 (base32
1209 "0p53mnmjbm56wizwraznynx13fcibcxiqny110dp6a5a3w174q73"))))
1210 (build-system gnu-build-system)
1211 (native-inputs
1212 `(("pkg-config" ,pkg-config)))
1213 (synopsis
1214 "Network communication layer on top of UDP")
1215 (description
1216 "ENet's purpose is to provide a relatively thin, simple and robust network
1217 communication layer on top of UDP. The primary feature it provides is optional
1218 reliable, in-order delivery of packets. ENet omits certain higher level
1219 networking features such as authentication, server discovery, encryption, or
1220 other similar tasks that are particularly application specific so that the
1221 library remains flexible, portable, and easily embeddable.")
1222 (home-page "http://enet.bespin.org")
1223 (license license:expat)))
1224
1225 (define-public sslh
1226 (package
1227 (name "sslh")
1228 (version "1.19c")
1229 (source (origin
1230 (method url-fetch)
1231 (uri (string-append "https://github.com/yrutschle/sslh/archive/v"
1232 version ".tar.gz"))
1233 (file-name (string-append name "-" version ".tar.gz"))
1234 (sha256
1235 (base32
1236 "0pd8hifa9h0rm7vms3k6ic1k29xigrlv2idc5wgcafmb1v1243di"))))
1237 (build-system gnu-build-system)
1238 (native-inputs
1239 `(;; Test dependencies.
1240 ("lcov" ,lcov)
1241 ("perl" ,perl)
1242 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
1243 ("perl-socket6" ,perl-socket6)
1244 ("psmisc" ,psmisc)
1245 ("valgrind" ,valgrind)))
1246 (inputs
1247 `(("libcap" ,libcap)
1248 ("libconfig" ,libconfig)
1249 ("pcre" ,pcre)
1250 ("tcp-wrappers" ,tcp-wrappers)))
1251 (arguments
1252 '(#:phases
1253 (modify-phases %standard-phases
1254 (delete 'configure) ; no configure script
1255 (add-before 'check 'fix-tests
1256 (lambda _
1257 (substitute* "./t"
1258 (("\"/tmp") "$ENV{\"TMPDIR\"} . \"")
1259 ;; The Guix build environment lacks ‘ip6-localhost’.
1260 (("ip6-localhost") "localhost"))
1261 #t))
1262 ;; Many of these files are mentioned in the man page. Install them.
1263 (add-after 'install 'install-documentation
1264 (lambda* (#:key outputs #:allow-other-keys)
1265 (let* ((out (assoc-ref outputs "out"))
1266 (doc (string-append out "/share/doc/sslh")))
1267 (install-file "README.md" doc)
1268 (for-each
1269 (lambda (file)
1270 (install-file file (string-append doc "/examples")))
1271 (append (find-files "." "\\.cfg")
1272 (find-files "scripts"))))
1273 #t)))
1274 #:make-flags (list "CC=gcc"
1275 "USELIBCAP=1"
1276 "USELIBWRAP=1"
1277 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1278 #:test-target "test"))
1279 (home-page "https://www.rutschle.net/tech/sslh/README.html")
1280 (synopsis "Applicative network protocol demultiplexer")
1281 (description
1282 "sslh is a network protocol demultiplexer. It acts like a switchboard,
1283 accepting connections from clients on one port and forwarding them to different
1284 servers based on the contents of the first received data packet. Detection of
1285 common protocols like HTTP(S), SSL, SSH, OpenVPN, tinc, and XMPP is already
1286 implemented, but any other protocol that matches a regular expression can be
1287 added. sslh's name comes from its original application of serving both SSH and
1288 HTTPS on port 443, allowing SSH connections from inside corporate firewalls
1289 that block port 22.")
1290 (license (list license:bsd-2 ; tls.[ch]
1291 license:gpl2+)))) ; everything else
1292
1293 (define-public iperf
1294 (package
1295 (name "iperf")
1296 (version "3.1.7")
1297 (source (origin
1298 (method url-fetch)
1299 (uri (string-append "http://downloads.es.net/pub/iperf"
1300 "/iperf-" version ".tar.gz"))
1301 (sha256
1302 (base32
1303 "0kvk8d0a3dcxc8fisyprbn01y8akxj4sx8ld5dh508p9dx077vx4"))))
1304 (build-system gnu-build-system)
1305 (synopsis "TCP, UDP and SCTP bandwidth measurement tool")
1306 (description
1307 "iPerf is a tool to measure achievable bandwidth on IP networks. It
1308 supports tuning of various parameters related to timing, buffers and
1309 protocols (TCP, UDP, SCTP with IPv4 and IPv6). For each test it reports
1310 the bandwidth, loss, and other parameters.")
1311 (home-page "http://software.es.net/iperf/")
1312 (license (list license:bsd-3 ; Main distribution.
1313 license:ncsa ; src/{units,iperf_locale,tcp_window_size}.c
1314 license:expat ; src/{cjson,net}.[ch]
1315 license:public-domain)))) ; src/portable_endian.h
1316
1317 (define-public nethogs
1318 (package
1319 (name "nethogs")
1320 (version "0.8.5")
1321 (source (origin
1322 (method url-fetch)
1323 (uri (string-append "https://github.com/raboof/nethogs/archive/v"
1324 version ".tar.gz"))
1325 (sha256
1326 (base32
1327 "1k4x8r7s4dgcb6n2rjn28h2yyij92mwm69phncl3597cdxr954va"))
1328 (file-name (string-append name "-" version ".tar.gz"))))
1329 (build-system gnu-build-system)
1330 (inputs
1331 `(("libpcap" ,libpcap)
1332 ("ncurses" ,ncurses)))
1333 (arguments
1334 `(#:make-flags `("CC=gcc"
1335 ,(string-append "PREFIX=" %output))
1336 #:phases
1337 (modify-phases %standard-phases
1338 (delete 'configure)))) ; No ./configure script.
1339 (home-page "https://github.com/raboof/nethogs")
1340 (synopsis "Per-process bandwidth monitor")
1341 (description "NetHogs is a small 'net top' tool for Linux. Instead of
1342 breaking the traffic down per protocol or per subnet, like most tools do, it
1343 groups bandwidth by process.
1344
1345 NetHogs does not rely on a special kernel module to be loaded. If there's
1346 suddenly a lot of network traffic, you can fire up NetHogs and immediately see
1347 which PID is causing this. This makes it easy to identify programs that have
1348 gone wild and are suddenly taking up your bandwidth.")
1349 (license license:gpl2+)))
1350
1351 (define-public nzbget
1352 (package
1353 (name "nzbget")
1354 (version "20.0")
1355 (source
1356 (origin
1357 (method url-fetch)
1358 (uri (string-append "https://github.com/nzbget/nzbget/archive/v"
1359 version ".tar.gz"))
1360 (file-name (string-append name "-" version ".tar.gz"))
1361 (sha256
1362 (base32
1363 "0q93aqqyzccn5r9sny38499rmg846qdh9pi2v5kvf9m23v54yk60"))
1364 (modules '((guix build utils)))
1365 (snippet
1366 ;; Reported upstream as <https://github.com/nzbget/nzbget/pull/414>.
1367 '(begin
1368 (substitute* "daemon/connect/TlsSocket.cpp"
1369 (("gnutls_certificate-verification_status_print")
1370 "gnutls_certificate_verification_status_print"))
1371 #t))))
1372 (arguments
1373 `(#:configure-flags
1374 (list
1375 (string-append "--with-libcurses-includes="
1376 (assoc-ref %build-inputs "ncurses") "/include")
1377 (string-append "--with-libcurses-libraries="
1378 (assoc-ref %build-inputs "ncurses") "/lib")
1379 (string-append "--with-tlslib=GnuTLS"))))
1380 (build-system gnu-build-system)
1381 (inputs `(("gnutls" ,gnutls)
1382 ("libxml2" ,libxml2)
1383 ("ncurses" ,ncurses)
1384 ("zlib" ,zlib)))
1385 (native-inputs `(("pkg-config" ,pkg-config)))
1386 (home-page "https://github.com/nzbget/nzbget")
1387 (synopsis "Usenet binary file downloader")
1388 (description
1389 "NZBGet is a binary newsgrabber, which downloads files from Usenet based
1390 on information given in @code{nzb} files. NZBGet can be used in standalone
1391 and in server/client modes. In standalone mode, you pass NZBGet @command{nzb}
1392 files as command-line parameters and it downloads them and exits. NZBGet also
1393 contains a Web interface. Its server can be controlled through remote
1394 procedure calls (RPCs).")
1395 (license license:gpl2+)))
1396
1397 (define-public openvswitch
1398 (package
1399 (name "openvswitch")
1400 (version "2.8.1")
1401 (source (origin
1402 (method url-fetch)
1403 (uri (string-append
1404 "http://openvswitch.org/releases/openvswitch-"
1405 version ".tar.gz"))
1406 (sha256
1407 (base32
1408 "14rqqhfyv49irz8ag0qbv9jn8z0bn3qzxir3r074y16p4sg4674d"))))
1409 (build-system gnu-build-system)
1410 (arguments
1411 '(;; FIXME: many tests fail with:
1412 ;; […]
1413 ;; test -e $OVS_RUNDIR/ovs-vswitchd.pid
1414 ;; ovs-appctl -t ovs-vswitchd exit
1415 ;; hard failure
1416 #:tests? #f
1417 #:configure-flags
1418 '("--enable-shared"
1419 "--localstatedir=/var"
1420 "--with-dbdir=/var/lib/openvswitch")
1421 #:phases
1422 (modify-phases %standard-phases
1423 (replace 'install
1424 (lambda _
1425 (invoke "make"
1426 ;; Don't try to create directories under /var.
1427 "RUNDIR=/tmp"
1428 "PKIDIR=/tmp"
1429 "LOGDIR=/tmp"
1430 "DBDIR=/tmp"
1431 "install"))))))
1432 (native-inputs
1433 `(("perl" ,perl)
1434 ("pkg-config" ,pkg-config)
1435 ("python" ,python-2)
1436 ;; for testing
1437 ("util-linux" ,util-linux)))
1438 (propagated-inputs
1439 `(("python-six" ,python2-six)))
1440 (inputs
1441 `(("libcap-ng" ,libcap-ng)
1442 ("openssl" ,openssl)))
1443 (synopsis "Virtual network switch")
1444 (home-page "http://www.openvswitch.org/")
1445 (description
1446 "Open vSwitch is a multilayer virtual switch. It is designed to enable
1447 massive network automation through programmatic extension, while still
1448 supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
1449 IPFIX, RSPAN, CLI, LACP, 802.1ag).")
1450 (license ; see debian/copyright for detail
1451 (list license:lgpl2.1 ; xenserver and utilities/bugtool
1452 license:gpl2 ; datapath
1453 license:bsd-2 license:bsd-3
1454 license:asl2.0)))) ; all other
1455
1456 (define-public python-ipy
1457 (package
1458 (name "python-ipy")
1459 (version "0.83")
1460 (source (origin
1461 (method url-fetch)
1462 (uri (pypi-uri "IPy" version))
1463 (sha256
1464 (base32
1465 "1f6sdrxclifky4gvkf4gvyv5hx3fjh8vzspnfrqki6qm5d9mmnk1"))))
1466 (build-system python-build-system)
1467 (home-page "https://github.com/autocracy/python-ipy/")
1468 (synopsis "Python class and tools for handling IP addresses and networks")
1469 (description "The @code{IP} class allows a comfortable parsing and
1470 handling for most notations in use for IPv4 and IPv6 addresses and
1471 networks.")
1472 (license license:bsd-3)))
1473
1474 (define-public python2-ipy
1475 (package-with-python2 python-ipy))
1476
1477 (define-public speedtest-cli
1478 (package
1479 (name "speedtest-cli")
1480 (version "2.0.2")
1481 (source
1482 (origin
1483 (method git-fetch)
1484 (uri (git-reference
1485 (url "https://github.com/sivel/speedtest-cli")
1486 (commit (string-append "v" version))))
1487 (file-name (git-file-name name version))
1488 (sha256
1489 (base32
1490 "0vv2z37g2kgm2dzkfa4bhri92hs0d1acxi8z66gznsl5148q7sdi"))))
1491 (build-system python-build-system)
1492 (home-page "https://github.com/sivel/speedtest-cli")
1493 (synopsis "Internet bandwidth tester")
1494 (description
1495 "Command line interface for testing internet bandwidth using
1496 speedtest.net.")
1497 (license license:asl2.0)))
1498
1499 (define-public tftp-hpa
1500 (package
1501 (name "tftp-hpa")
1502 (version "5.2")
1503 (source (origin
1504 (method url-fetch)
1505 (uri (string-append "mirror://kernel.org/software/"
1506 "network/tftp/tftp-hpa/tftp-hpa-" version
1507 ".tar.xz"))
1508 (sha256
1509 (base32
1510 "12vidchglhyc20znq5wdsbhi9mqg90jnl7qr9qs8hbvaz4fkdvmg"))))
1511 (build-system gnu-build-system)
1512 (arguments `(#:tests? #f)) ; no test target
1513 (synopsis "HPA's tftp client")
1514 (description
1515 "This is a tftp client derived from OpenBSD tftp with some extra options
1516 added and bugs fixed. The source includes readline support but it is not
1517 enabled due to license conflicts between the BSD advertising clause and the GPL.")
1518 (home-page "http://git.kernel.org/cgit/network/tftp/tftp-hpa.git/about/")
1519 ;; Some source files are distributed under a 3-clause BSD license, and
1520 ;; others under a 4-clause BSD license. Refer to the files in the source
1521 ;; distribution for clarification.
1522 (license (list license:bsd-3 license:bsd-4))))
1523
1524 (define-public pidentd
1525 (package
1526 (name "pidentd")
1527 (version "3.0.19")
1528 (source
1529 (origin
1530 (method url-fetch)
1531 (uri (string-append "https://github.com/ptrrkssn/pidentd/archive/"
1532 "v" version ".tar.gz"))
1533 (file-name (string-append name "-" version ".tar.gz"))
1534 (sha256
1535 (base32
1536 "0y3kd1bkydqkpc1qdff24yswysamsqivvadjy0468qri5730izgc"))))
1537 (build-system gnu-build-system)
1538 (arguments
1539 `(#:tests? #f)) ; No tests are included
1540 (inputs
1541 `(("openssl" ,openssl))) ; For the DES library
1542 (home-page "https://www.lysator.liu.se/~pen/pidentd/")
1543 (synopsis "Small Ident Daemon")
1544 (description
1545 "@dfn{Pidentd} (Peter's Ident Daemon) is a identd, which implements a
1546 identification server. Pidentd looks up specific TCP/IP connections and
1547 returns the user name and other information about the connection.")
1548 (license license:public-domain)))
1549
1550 (define-public spiped
1551 (package
1552 (name "spiped")
1553 (version "1.6.0")
1554 (source (origin
1555 (method url-fetch)
1556 (uri (string-append "https://www.tarsnap.com/spiped/spiped-"
1557 version ".tgz"))
1558 (sha256
1559 (base32
1560 "1r51rdcl7nib1yv3yvgd5alwlkkwmr387brqavaklb0p2bwzixz6"))))
1561 (build-system gnu-build-system)
1562 (arguments
1563 '(#:test-target "test"
1564 #:make-flags (let* ((out (assoc-ref %outputs "out"))
1565 (bindir (string-append out "/bin"))
1566 (man1dir (string-append out "/share/man/man1")))
1567 (list "CC=gcc" ; It tries to invoke `c99`.
1568 (string-append "BINDIR=" bindir)
1569 (string-append "MAN1DIR=" man1dir)))
1570 #:phases
1571 (modify-phases %standard-phases
1572 (add-after 'unpack 'patch-command-invocations
1573 (lambda _
1574 (substitute* '("Makefile"
1575 "libcperciva/cpusupport/Build/cpusupport.sh"
1576 "libcperciva/POSIX/posix-cflags.sh"
1577 "libcperciva/POSIX/posix-l.sh")
1578 (("command -p") ""))
1579 #t))
1580 (delete 'configure) ; No ./configure script.
1581 (add-after 'install 'install-more-docs
1582 (lambda* (#:key outputs #:allow-other-keys)
1583 (let* ((out (assoc-ref %outputs "out"))
1584 (misc (string-append out "/share/doc/spiped")))
1585 (install-file "DESIGN.md" misc)
1586 #t))))))
1587 (native-inputs
1588 `(("procps" ,procps))) ; `ps` is used by the test suite.
1589 (inputs
1590 `(("openssl" ,openssl)))
1591 (home-page "https://www.tarsnap.com/spiped.html")
1592 (synopsis "Create secure pipes between sockets")
1593 (description "Spiped (pronounced \"ess-pipe-dee\") is a utility for creating
1594 symmetrically encrypted and authenticated pipes between socket addresses, so
1595 that one may connect to one address (e.g., a UNIX socket on localhost) and
1596 transparently have a connection established to another address (e.g., a UNIX
1597 socket on a different system). This is similar to 'ssh -L' functionality, but
1598 does not use SSH and requires a pre-shared symmetric key.")
1599 (license license:bsd-2)))
1600
1601 (define-public quagga
1602 (package
1603 (name "quagga")
1604 (version "1.2.4")
1605 (source (origin
1606 (method url-fetch)
1607 (uri (string-append "mirror://savannah/quagga/quagga-"
1608 version ".tar.gz"))
1609 (sha256
1610 (base32
1611 "1lsksqxij5f1llqn86pkygrf5672kvrqn1kvxghi169hqf1c0r73"))
1612 (patches
1613 (search-patches "quagga-reproducible-build.patch"))))
1614 (build-system gnu-build-system)
1615 (native-inputs `(("pkg-config" ,pkg-config)
1616 ("perl" ,perl)
1617 ("dejagnu" ,dejagnu)))
1618 (inputs `(("readline" ,readline)
1619 ("c-ares" ,c-ares)))
1620 (synopsis "Routing Software Suite")
1621 (description "Quagga is a routing software suite, providing implementations
1622 of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for Unix platforms.
1623
1624 The Quagga architecture consists of a core daemon, @command{zebra}, which
1625 acts as an abstraction layer to the underlying Unix kernel and presents the
1626 Zserv API over a Unix or TCP stream to Quagga clients. It is these Zserv
1627 clients which typically implement a routing protocol and communicate routing
1628 updates to the zebra daemon.")
1629 (home-page "https://www.nongnu.org/quagga/")
1630 (license license:gpl2+)))
1631
1632 (define-public thc-ipv6
1633 (let ((revision "0")
1634 (commit "4bb72573e0950ce6f8ca2800a10748477020029e"))
1635 (package
1636 (name "thc-ipv6")
1637 (version (git-version "3.4" revision commit))
1638 (source (origin
1639 (method git-fetch)
1640 (uri (git-reference
1641 (url "https://github.com/vanhauser-thc/thc-ipv6.git")
1642 (commit commit)))
1643 (file-name (git-file-name name version))
1644 (sha256
1645 (base32
1646 "1x5i6vbsddqc2yks7r1a2fw2fk16qxvd6hpzh1lykjfpkal8fdir"))))
1647 (build-system gnu-build-system)
1648 (arguments
1649 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1650 #:tests? #f ; No test suite.
1651 #:phases
1652 (modify-phases %standard-phases
1653 (delete 'configure) ; No ./configure script.
1654 (add-before 'build 'patch-paths
1655 (lambda _
1656 (substitute* "Makefile"
1657 (("/bin/echo") "echo"))
1658 #t))
1659 (add-after 'install 'install-more-docs
1660 (lambda* (#:key outputs #:allow-other-keys)
1661 (let* ((out (assoc-ref outputs "out"))
1662 (doc (string-append out "/share/thc-ipv6/doc")))
1663 (install-file "README" doc)
1664 (install-file "HOWTO-INJECT" doc)
1665 #t))))))
1666 ;; TODO Add libnetfilter-queue once packaged.
1667 (inputs
1668 `(("libpcap" ,libpcap)
1669 ("openssl" ,openssl)
1670 ("perl" ,perl)))
1671 (home-page "https://github.com/vanhauser-thc/thc-ipv6")
1672 (synopsis "IPv6 security research toolkit")
1673 (description "The THC IPv6 Toolkit provides command-line tools and a library
1674 for researching IPv6 implementations and deployments. It requires Linux 2.6 or
1675 newer and only works on Ethernet network interfaces.")
1676 ;; AGPL 3 with exception for linking with OpenSSL. See the 'LICENSE' file in
1677 ;; the source distribution for more information.
1678 (license license:agpl3))))
1679
1680 (define-public bmon
1681 (package
1682 (name "bmon")
1683 (version "4.0")
1684 (source
1685 (origin
1686 (method url-fetch)
1687 (uri (string-append "https://github.com/tgraf/bmon/releases/download/v"
1688 version "/bmon-" version ".tar.gz"))
1689 (sha256
1690 (base32
1691 "0ylzriv4pwh76344abzl1w219x188gshbycbna35gsyfp09c7z82"))))
1692 (build-system gnu-build-system)
1693 (inputs
1694 `(("libconfuse" ,libconfuse)
1695 ("libnl" ,libnl)
1696 ("ncurses" ,ncurses)))
1697 (native-inputs
1698 `(("pkg-config" ,pkg-config)))
1699 (synopsis "Bandwidth monitor")
1700 (description "bmon is a monitoring and debugging tool to capture
1701 networking-related statistics and prepare them visually in a human-friendly
1702 way. It features various output methods including an interactive curses user
1703 interface and a programmable text output for scripting.")
1704 (home-page "https://github.com/tgraf/bmon")
1705 ;; README.md mentions both the 2-clause BSD and expat licenses, but all
1706 ;; the source files only have expat license headers. Upstream has been
1707 ;; contacted for clarification: https://github.com/tgraf/bmon/issues/59
1708 ;; Update the license field when upstream responds.
1709 (license (list license:bsd-2
1710 license:expat))))
1711
1712 (define-public libnet
1713 (package
1714 (name "libnet")
1715 (version "1.1.6")
1716 (source (origin
1717 (method url-fetch)
1718 (uri (string-append "https://github.com/sam-github/libnet/"
1719 "archive/libnet-" version ".tar.gz"))
1720 (file-name (string-append name "-" version ".tar.gz"))
1721 (sha256
1722 (base32
1723 "0l4gbzzvr199fzczzricjz7b825i7dlk6sgl5p5alnkcagmq0xys"))))
1724 (build-system gnu-build-system)
1725 (arguments
1726 `(#:phases
1727 (modify-phases %standard-phases
1728 (add-after 'unpack 'chdir
1729 (lambda _ (chdir "libnet") #t))
1730 (add-before 'build 'build-doc
1731 (lambda* (#:key make-flags #:allow-other-keys)
1732 (apply invoke "make" "-C" "doc" "doc"
1733 make-flags))))))
1734 (native-inputs
1735 `(("autoconf" ,autoconf)
1736 ("automake" ,automake)
1737 ("libtool" ,libtool)
1738 ("doxygen" ,doxygen)))
1739 (home-page "https://sourceforge.net/projects/libnet-dev/")
1740 (synopsis "Framework for low-level network packet construction")
1741 (description
1742 "Libnet provides a fairly portable framework for network packet
1743 construction and injection. It features portable packet creation interfaces
1744 at the IP layer and link layer, as well as a host of supplementary
1745 functionality. Using libnet, quick and simple packet assembly applications
1746 can be whipped up with little effort.")
1747 (license license:bsd-2)))
1748
1749 (define-public mtr
1750 (package
1751 (name "mtr")
1752 (version "0.92")
1753 (source
1754 (origin
1755 (method url-fetch)
1756 (uri (string-append "ftp://ftp.bitwizard.nl/" name "/"
1757 name "-" version ".tar.gz"))
1758 (sha256
1759 (base32 "10j3ds3p27jygys4x08kj8fi3zlsgiv72xsfazkah6plwawrv5zj"))))
1760 (build-system gnu-build-system)
1761 (inputs
1762 `(("libcap" ,libcap)
1763 ("ncurses" ,ncurses)))
1764 (native-inputs
1765 ;; The 0.92 release tarball still requires the ‘autoheader’ tool.
1766 `(("autoconf" ,autoconf)))
1767 (arguments
1768 `(#:tests? #f)) ; tests require network access
1769 (home-page "https://www.bitwizard.nl/mtr/")
1770 (synopsis "Network diagnostic tool")
1771 (description
1772 "@dfn{mtr} (My TraceRoute) combines the functionality of the
1773 @command{traceroute} and @command{ping} programs in a single network diagnostic
1774 tool. @command{mtr} can use several network protocols to detect intermediate
1775 routers (or @dfn{hops}) between the local host and a user-specified destination.
1776 It then continually measures the response time and packet loss at each hop, and
1777 displays the results in real time.")
1778 (license license:gpl2+)))
1779
1780 (define-public strongswan
1781 (package
1782 (name "strongswan")
1783 (version "5.6.3")
1784 (source
1785 (origin
1786 (method url-fetch)
1787 (uri (string-append "https://download.strongswan.org/strongswan-"
1788 version ".tar.bz2"))
1789 (sha256
1790 (base32 "095zg7h7qwsc456sqgwb1lhhk29ac3mk5z9gm6xja1pl061driy3"))))
1791 (build-system gnu-build-system)
1792 (arguments
1793 `(#:phases
1794 (modify-phases %standard-phases
1795 (add-before 'build 'patch-command-file-names
1796 (lambda* (#:key inputs #:allow-other-keys)
1797 (substitute* "src/libstrongswan/utils/process.c"
1798 (("/bin/sh")
1799 (string-append (assoc-ref inputs "bash") "/bin/sh")))
1800
1801 (substitute* "src/libstrongswan/tests/suites/test_process.c"
1802 (("/bin/sh") (which "sh"))
1803 (("/bin/echo") (which "echo"))
1804 (("cat") (which "cat")))
1805 #t))
1806 (add-before 'check 'set-up-test-environment
1807 (lambda* (#:key inputs #:allow-other-keys)
1808 (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
1809 "/share/zoneinfo"))
1810 #t)))
1811 #:configure-flags
1812 (list
1813 ;; Disable bsd-4 licensed plugins
1814 "--disable-des"
1815 "--disable-blowfish")))
1816 (inputs
1817 `(("curl" ,curl)
1818 ("gmp" ,gmp)
1819 ("libgcrypt" ,libgcrypt)
1820 ("openssl" ,openssl)))
1821 (native-inputs
1822 `(("coreutils" ,coreutils)
1823 ("tzdata" ,tzdata-for-tests)))
1824 (synopsis "IKEv1/v2 keying daemon")
1825 (description "StrongSwan is an IPsec implementation originally based upon
1826 the FreeS/WAN project. It contains support for IKEv1, IKEv2, MOBIKE, IPv6,
1827 NAT-T and more.")
1828 (home-page "https://strongswan.org/")
1829 (license
1830 (list license:gpl2+
1831 ;; src/aikgen/*
1832 ;; src/libcharon/plugins/dnscert/*
1833 ;; src/libcharon/plugins/ext_auth/*
1834 ;; src/libcharon/plugins/vici/ruby/*
1835 ;; src/libcharon/plugins/xauth_pam/xauth_pam_listener.[ch]
1836 license:expat
1837 ;; src/inclue/sys/*
1838 license:bsd-3
1839 ;; src/libstrongswan/plugins/sha3/sha3_keccak.c
1840 license:public-domain
1841 ;; src/libstrongswan/plugins/pkcs11/pkcs11.h
1842 (license:non-copyleft
1843 "file://src/libstrongswan/plugins/pkcs11/pkcs11.h"
1844 "pkcs11 contains a unknown permissive license. View the specific
1845 file for more details.")
1846 ;; These files are not included in the
1847 ;; build, they are disabled through
1848 ;; options to ./configure
1849 ;;
1850 ;; src/libstrongswan/plugins/blowfish/bf_enc.c
1851 ;; src/libstrongswan/plugins/blowfish/bf_locl.h
1852 ;; src/libstrongswan/plugins/blowfish/bf_pi.h
1853 ;; src/libstrongswan/plugins/blowfish/bf_skey.c
1854 ;; src/libstrongswan/plugins/blowfish/blowfish_crypter.c
1855 ;; src/libstrongswan/plugins/des/des_crypter.c
1856 license:bsd-4))))
1857
1858 (define-public amule
1859 (package
1860 (name "amule")
1861 (version "2.3.2")
1862 (source (origin
1863 (method git-fetch)
1864 (uri (git-reference
1865 (url "https://github.com/amule-project/amule")
1866 (commit version)))
1867 (file-name (git-file-name name version))
1868 (sha256
1869 (base32
1870 "010wxm6g9f92x6fympj501zbnjka32rzbx0sk3a2y4zpih5d2nsn"))
1871 ;; Patch for adopting crypto++ >= 6.0.
1872 (patches (search-patches "amule-crypto-6.patch"))))
1873 (build-system gnu-build-system)
1874 (arguments
1875 `(#:phases
1876 (modify-phases %standard-phases
1877 (delete 'bootstrap) ; bootstrap phase runs too early.
1878 (add-after 'patch-source-shebangs 'autogen
1879 (lambda _
1880 (invoke "sh" "autogen.sh")
1881 #t)))
1882 #:configure-flags
1883 '("--disable-rpath"
1884 "--enable-wxcas"
1885 "--enable-cas"
1886 "--enable-alc"
1887 "--enable-alcc"
1888 "--enable-xas"
1889 "--enable-amulecmd"
1890 "--enable-geoip"
1891 "--enable-ccache"
1892 "--enable-nls"
1893 "--enable-optimize"
1894 "--enable-amule-gui"
1895 "--enable-amule-daemon"
1896 "--enable-webserver"
1897 "--with-denoise-level=0")))
1898 (native-inputs
1899 `(("autoconf" ,autoconf)
1900 ("automake" ,automake)
1901 ("gettext-minimal" ,gettext-minimal)
1902 ("perl" ,perl)))
1903 (inputs
1904 `(("zlib" ,zlib)
1905 ("crypto++" ,crypto++)
1906 ("libpng" ,libpng)
1907 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
1908 (home-page "http://amule.org/")
1909 (synopsis "Peer-to-peer client for the eD2K and Kademlia networks")
1910 (description
1911 "aMule is an eMule-like client for the eD2k and Kademlia peer-to-peer
1912 file sharing networks. It includes a graphical user interface (GUI), a daemon
1913 allowing you to run a client with no graphical interface, and a Web GUI for
1914 remote access. The @command{amulecmd} command allows you to control aMule
1915 remotely.")
1916 (license license:gpl2+)))
1917
1918 (define-public zyre
1919 (package
1920 (name "zyre")
1921 (version "2.0.0")
1922 (source (origin
1923 (method url-fetch)
1924 (uri
1925 (string-append "https://github.com/zeromq/zyre/releases/download/v"
1926 version "/" name "-" version ".tar.gz"))
1927 (sha256
1928 (base32
1929 "0qz2730bng1gs9xbqxhkw88qbsmszgmmrl2g9k6xrg6r3bqvsdc7"))))
1930 (build-system gnu-build-system)
1931 (inputs `(("zeromq" ,zeromq)
1932 ("czmq" ,czmq)
1933 ("libsodium" ,libsodium)))
1934 (synopsis "Framework for proximity-based peer-to-peer applications")
1935 (description "Zyre provides reliable group messaging over local area
1936 networks using zeromq. It has these key characteristics:
1937
1938 @itemize
1939 @item Zyre needs no administration or configuration.
1940 @item Peers may join and leave the network at any time.
1941 @item Peers talk to each other without any central brokers or servers.
1942 @item Peers can talk directly to each other.
1943 @item Peers can join groups, and then talk to groups.
1944 @item Zyre is reliable, and loses no messages even when the network is heavily loaded.
1945 @item Zyre is fast and has low latency, requiring no consensus protocols.
1946 @item Zyre is designed for WiFi networks, yet also works well on Ethernet networks.
1947 @end itemize")
1948 (home-page "https://github.com/zeromq/zyre")
1949 (license license:mpl2.0)))
1950
1951 (define-public can-utils
1952 (package
1953 (name "can-utils")
1954 (version "2018.02.0")
1955 (source (origin
1956 (method git-fetch)
1957 (uri (git-reference
1958 (url "https://github.com/linux-can/can-utils.git")
1959 (commit (string-append "v" version))))
1960 (file-name (git-file-name name version))
1961 (sha256
1962 (base32
1963 "0r0zkm67bdcmbfypjr7z041d4zp0xzb379dyl8cvhmflh12fd2jb"))))
1964 (build-system gnu-build-system)
1965 (arguments
1966 `(#:tests? #f ; No tests exist.
1967 #:make-flags (list "CC=gcc"
1968 (string-append "PREFIX="
1969 (assoc-ref %outputs "out")))
1970 #:phases
1971 (modify-phases %standard-phases
1972 (delete 'bootstrap)
1973 (delete 'configure))))
1974 (home-page "https://github.com/linux-can/can-utils")
1975 (synopsis "CAN utilities")
1976 (description "This package provides CAN utilities in the following areas:
1977
1978 @itemize
1979 @item Basic tools to display, record, generate and replay CAN traffic
1980 @item CAN access via IP sockets
1981 @item CAN in-kernel gateway configuration
1982 @item CAN bus measurement and testing
1983 @item ISO-TP (ISO15765-2:2016 - this means messages with a body larger than
1984 eight bytes) tools
1985 @item Log file converters
1986 @item Serial Line Discipline configuration for slcan driver
1987 @end itemize")
1988 ;; Either BSD-3 or GPL-2 can be used.
1989 (license (list license:bsd-3 license:gpl2))))
1990
1991 (define-public asio
1992 (package
1993 (name "asio")
1994 (version "1.12.1")
1995 (source
1996 (origin
1997 (method url-fetch)
1998 (uri (string-append "mirror://sourceforge/asio/asio/"
1999 version " (Stable)/" name "-" version ".tar.bz2"))
2000 (sha256
2001 (base32
2002 "0nln45662kg799ykvqx5m9z9qcsmadmgg6r5najryls7x16in2d9"))))
2003 (build-system gnu-build-system)
2004 (inputs
2005 `(("boost" ,boost)
2006 ("openssl" ,openssl)))
2007 (arguments
2008 `(#:configure-flags
2009 (list
2010 (string-append "--with-boost=" (assoc-ref %build-inputs "boost"))
2011 (string-append "--with-openssl=" (assoc-ref %build-inputs "openssl")))))
2012 (home-page "https://think-async.com/Asio")
2013 (synopsis "C++ library for ASynchronous network I/O")
2014 (description "Asio is a cross-platform C++ library for network and
2015 low-level I/O programming that provides developers with a consistent
2016 asynchronous model using a modern C++ approach.")
2017 (license license:boost1.0)))
2018
2019 (define-public shadowsocks
2020 ;; There are some security fixes after the last release.
2021 (let* ((commit "e332ec93e9c90f1cbee676b022bf2c5d5b7b1239")
2022 (revision "0")
2023 (version (git-version "2.8.2" revision commit)))
2024 (package
2025 (name "shadowsocks")
2026 (version version)
2027 (home-page "https://github.com/shadowsocks/shadowsocks")
2028 (source (origin
2029 (method git-fetch)
2030 (uri (git-reference
2031 (url home-page)
2032 (commit commit)))
2033 (sha256
2034 (base32
2035 "1idd9b4f2pnhcpk1bh030hqg5zq25gkwxd53xi3c0cj242w7sp2j"))
2036 (file-name (git-file-name name version))))
2037 (build-system python-build-system)
2038 (synopsis "Fast tunnel proxy that helps you bypass firewalls")
2039 (description
2040 "This package is a fast tunnel proxy that helps you bypass firewalls.
2041
2042 Features:
2043 @itemize
2044 @item TCP & UDP support
2045 @item User management API
2046 @item TCP Fast Open
2047 @item Workers and graceful restart
2048 @item Destination IP blacklist
2049 @end itemize")
2050 (license license:asl2.0))))
2051
2052 (define-public net-snmp
2053 (package
2054 (name "net-snmp")
2055 (version "5.8")
2056 (source (origin
2057 (method url-fetch)
2058 (uri (string-append "mirror://sourceforge/net-snmp/net-snmp/"
2059 version "/net-snmp-" version ".tar.gz"))
2060 (sha256
2061 (base32
2062 "1pvajzj9gmj56dmwix0ywmkmy2pglh6nny646hkm7ghfhh03bz5j"))
2063 (modules '((guix build utils)))
2064 (snippet
2065 '(begin
2066 ;; Drop bundled libraries.
2067 (delete-file-recursively "snmplib/openssl")
2068 #t))))
2069 (build-system gnu-build-system)
2070 (arguments
2071 `(#:test-target "test"
2072 ;; XXX: With parallel build enabled, Perl modules may not get linked with
2073 ;; libnetsnmp. See e.g. <https://bugzilla.novell.com/show_bug.cgi?id=819497>.
2074 #:parallel-build? #f
2075 #:configure-flags
2076 (list (string-append "LDFLAGS=-Wl,-rpath="
2077 (assoc-ref %outputs "out")
2078 "/lib")
2079 "--with-logfile=/var/log/snmpd.log"
2080 (string-append "--with-openssl="
2081 (assoc-ref %build-inputs "openssl")))
2082 #:phases
2083 (modify-phases %standard-phases
2084 (add-after 'unpack 'patch-tests
2085 (lambda* (#:key inputs #:allow-other-keys)
2086 (substitute* "testing/fulltests/support/simple_TESTCONF.sh"
2087 (("NETSTAT=\"\"")
2088 (string-append "NETSTAT=\"" (which "netstat") "\"")))
2089 (substitute* '("testing/fulltests/default/T065agentextend_simple"
2090 "testing/fulltests/default/T115agentxperl_simple")
2091 (("/usr/bin/env") (which "env")))
2092 (substitute* "testing/fulltests/default/T065agentextend_sh_simple"
2093 (("/bin/sh") (which "sh")))
2094 ;; These tests require network access.
2095 (for-each delete-file
2096 '("testing/fulltests/default/T070com2sec_simple"
2097 "testing/fulltests/default/T071com2sec6_simple"))
2098 #t))
2099 (add-after 'unpack 'patch-Makefile.PL
2100 (lambda* (#:key outputs #:allow-other-keys)
2101 (substitute* "Makefile.in"
2102 (("Makefile.PL -NET")
2103 (string-append "Makefile.PL PREFIX="
2104 (assoc-ref outputs "out")
2105 " INSTALLDIRS=site" " NO_PERLLOCAL=1"
2106 " -NET")))
2107 #t)))))
2108 (inputs
2109 `(("perl" ,perl)
2110 ("openssl" ,openssl)
2111 ("libnl" ,libnl)))
2112 ;; These inputs are only needed for tests.
2113 (native-inputs
2114 `(("net-tools" ,net-tools)
2115 ("coreutils" ,coreutils)
2116 ("grep" ,grep)))
2117 (home-page "http://www.net-snmp.org/")
2118 (synopsis "Simple Network Management Protocol library and tools")
2119 (description "The @dfn{Simple Network Management Protocol} (SNMP) is a
2120 widely used protocol for monitoring the health and welfare of network
2121 equipment (e.g. routers), computer equipment and even devices like UPSs.
2122 Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and
2123 SNMP v3 using both IPv4 and IPv6.")
2124 (license (list license:bsd-3
2125 (license:non-copyleft
2126 "http://www.net-snmp.org/about/license.html"
2127 "CMU/UCD copyright notice")))))
2128
2129 (define-public ubridge
2130 (package
2131 (name "ubridge")
2132 (version "0.9.14")
2133 (source (origin
2134 (method url-fetch)
2135 (uri (string-append "https://github.com/GNS3/ubridge/archive/v"
2136 version ".tar.gz"))
2137 (file-name (string-append name "-" version ".tar.gz"))
2138 (sha256
2139 (base32
2140 "1hivb8wqkk5047bdl2vbsbcvkmam1107hx1ahy4virq2bkqki1fj"))))
2141 (build-system gnu-build-system)
2142 (arguments
2143 `(#:tests? #f ;no tests
2144 #:make-flags '("CC=gcc")
2145 #:phases
2146 (modify-phases %standard-phases
2147 (delete 'configure)
2148 (add-before 'install 'set-bindir
2149 (lambda* (#:key inputs outputs #:allow-other-keys)
2150 (let ((bin (string-append (assoc-ref outputs "out")
2151 "/bin")))
2152 (mkdir-p bin)
2153 (substitute* "Makefile"
2154 (("\\$\\(BINDIR\\)") bin)
2155 (("\tsetcap cap_net.*$") "")))
2156 #t)))))
2157 (inputs
2158 `(("libpcap" ,libpcap)))
2159 (home-page "https://github.com/GNS3/ubridge/")
2160 (synopsis "Bridge for UDP tunnels, Ethernet, TAP and VMnet interfaces")
2161 (description "uBridge is a simple program to create user-land bridges
2162 between various technologies. Currently, bridging between UDP tunnels,
2163 Ethernet and TAP interfaces is supported. Packet capture is also supported.")
2164 (license license:gpl3+)))
2165
2166 (define-public hcxtools
2167 (let* ((commit "2ecfc9a06c2028c47522ea566ccd82b2c1f94647"))
2168 (package
2169 (name "hcxtools")
2170 (version (git-version "0.0.0" "1" commit))
2171 (home-page "https://github.com/ZerBea/hcxtools")
2172 (source (origin
2173 (method git-fetch)
2174 (uri (git-reference
2175 (url home-page)
2176 (commit commit)))
2177 (sha256
2178 (base32
2179 "1hzwrpmxjxl674if0pp5iq06mdi24k7ni7bh1h20isp4s40201n3"))
2180 (file-name (git-file-name name version))))
2181 (build-system gnu-build-system)
2182 (inputs
2183 `(("curl" ,curl)
2184 ("libpcap" ,libpcap)
2185 ("openssl" ,openssl)
2186 ("zlib" ,zlib)))
2187 (arguments
2188 `(#:make-flags (list "CC=gcc"
2189 (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
2190 #:tests? #f ;no tests
2191 #:phases
2192 (modify-phases %standard-phases
2193 (delete 'configure)
2194 (add-after 'unpack 'set-environment
2195 (lambda* (#:key inputs #:allow-other-keys)
2196 (setenv "C_INCLUDE_PATH"
2197 (string-append (assoc-ref inputs "curl")
2198 "/include:"
2199 (assoc-ref inputs "libpcap")
2200 "/include:"
2201 (assoc-ref inputs "openssl")
2202 "/include:"
2203 (assoc-ref inputs "zlib")
2204 "/include:"
2205 (getenv "C_INCLUDE_PATH")))
2206 #t)))))
2207 (synopsis "Capture wlan traffic to hashcat and John the Ripper")
2208 (description
2209 "This package contains a small set of tools to capture and convert
2210 packets from wireless devices for use with hashcat or John the Ripper.")
2211 (license license:expat))))
2212
2213 (define-public hcxdumptool
2214 (let* ((commit "f4799b5da82c5b030a6d99b02d1c1b9dc838ad36"))
2215 (package
2216 (name "hcxdumptool")
2217 (version (git-version "0.0.0" "1" commit))
2218 (home-page "https://github.com/ZerBea/hcxdumptool")
2219 (source (origin
2220 (method git-fetch)
2221 (uri (git-reference
2222 (url home-page)
2223 (commit commit)))
2224 (sha256
2225 (base32
2226 "0qlsin0rws9sshn12faq4spmd0ffzssal36s71vhv6gkhhga7abl"))
2227 (file-name (git-file-name name version))))
2228 (build-system gnu-build-system)
2229 (arguments
2230 `(#:make-flags (list "CC=gcc"
2231 (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
2232 #:tests? #f ;no tests
2233 #:phases
2234 (modify-phases %standard-phases
2235 (delete 'configure))))
2236 (synopsis "Small tool to capture packets from wlan devices")
2237 (description
2238 "Small tool to capture packets from WLAN devices. After capturing,
2239 upload the \"uncleaned\" cap to @url{https://wpa-sec.stanev.org/?submit} to
2240 see if the access point or the client is vulnerable to a dictionary attack.
2241 Convert the cap file to hccapx format and/or to WPA-PMKID-PBKDF2
2242 hashline (16800) with @command{hcxpcaptool} from the @code{hcxtools} package
2243 and check if the WLAN key or the master key was transmitted unencrypted.")
2244 (license license:expat))))
2245
2246 (define-public dante
2247 (package
2248 (name "dante")
2249 (version "1.4.2")
2250 (source
2251 (origin
2252 (method url-fetch)
2253 (uri (string-append "https://www.inet.no/dante/files/dante-"
2254 version ".tar.gz"))
2255 (sha256
2256 (base32
2257 "19rqzj167q73ag20zxpvswhkk0bj56r5maf83v5016sw7vrcz5sc"))))
2258 (build-system gnu-build-system)
2259 (arguments
2260 ;; XXX: The dynamic socks library doesn't work with 'libc.so' (GNU ld
2261 ;; script). When preloading is enabled, 'sockd' failed with:
2262 ;; … Failed to open library "libc.so": …: invalid ELF header
2263 '(#:configure-flags '("--disable-preload")))
2264 (home-page "https://www.inet.no/dante/")
2265 (synopsis "SOCKS server and client")
2266 (description "Dante is a SOCKS client and server implementation. It can
2267 be installed on a machine with access to an external TCP/IP network and will
2268 allow all other machines, without direct access to that network, to be relayed
2269 through the machine the Dante server is running on. The external network will
2270 never see any machines other than the one Dante is running on.")
2271 (license (license:non-copyleft "file://LICENSE"))))