Merge branch 'master' into core-updates
[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 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 ng0 <ng0@infotropique.org>
12 ;;; Copyright © 2016, 2017 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 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2017 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 ;;;
23 ;;; This file is part of GNU Guix.
24 ;;;
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
29 ;;;
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
34 ;;;
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37
38 (define-module (gnu packages networking)
39 #:use-module ((guix licenses) #:prefix license:)
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix git-download)
43 #:use-module (guix build-system cmake)
44 #:use-module (guix build-system glib-or-gtk)
45 #:use-module (guix build-system gnu)
46 #:use-module (guix build-system perl)
47 #:use-module (guix build-system python)
48 #:use-module (gnu packages)
49 #:use-module (gnu packages admin)
50 #:use-module (gnu packages adns)
51 #:use-module (gnu packages algebra)
52 #:use-module (gnu packages audio)
53 #:use-module (gnu packages autotools)
54 #:use-module (gnu packages base)
55 #:use-module (gnu packages bison)
56 #:use-module (gnu packages check)
57 #:use-module (gnu packages code)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages curl)
60 #:use-module (gnu packages databases)
61 #:use-module (gnu packages dejagnu)
62 #:use-module (gnu packages documentation)
63 #:use-module (gnu packages flex)
64 #:use-module (gnu packages gettext)
65 #:use-module (gnu packages glib)
66 #:use-module (gnu packages gnome)
67 #:use-module (gnu packages gnupg)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages libidn)
70 #:use-module (gnu packages linux)
71 #:use-module (gnu packages lua)
72 #:use-module (gnu packages multiprecision)
73 #:use-module (gnu packages kerberos)
74 #:use-module (gnu packages ncurses)
75 #:use-module (gnu packages pcre)
76 #:use-module (gnu packages perl)
77 #:use-module (gnu packages perl-check)
78 #:use-module (gnu packages pkg-config)
79 #:use-module (gnu packages python)
80 #:use-module (gnu packages qt)
81 #:use-module (gnu packages readline)
82 #:use-module (gnu packages ssh)
83 #:use-module (gnu packages textutils)
84 #:use-module (gnu packages tls)
85 #:use-module (gnu packages valgrind)
86 #:use-module (gnu packages wm)
87 #:use-module (gnu packages xml)
88 #:use-module (ice-9 match))
89
90 ;; The gnu.org ‘home’ for this GNU project is a directory listing with 1.6.0 as
91 ;; the latest version. The author's git repository, mentioned in the 1.6.0
92 ;; README and otherwise legit-looking, contains a proper 1.7.0 release tarball
93 ;; with many OUI updates. Use it, even though it's also several years old now.
94 (define-public macchanger
95 (package
96 (name "macchanger")
97 (version "1.7.0")
98 (source
99 (origin
100 (method url-fetch)
101 (uri (string-append "https://github.com/alobbs/macchanger/"
102 "releases/download/" version "/"
103 name "-" version ".tar.gz"))
104 (sha256
105 (base32 "1gs5m0jxyprdp00w2qkbnaqm3ilkjz0q1gqdg4nzdm8g4xy73qns"))))
106 (build-system gnu-build-system)
107 (home-page "https://www.gnu.org/software/macchanger/")
108 (synopsis "Viewing and manipulating MAC addresses of network interfaces")
109 (description "GNU MAC Changer is a utility for viewing and changing MAC
110 addresses of networking devices. New addresses may be set explicitly or
111 randomly. They can include MAC addresses of the same or other hardware vendors
112 or, more generally, MAC addresses of the same category of hardware.")
113 (license license:gpl2+)))
114
115 (define-public miredo
116 (package
117 (name "miredo")
118 (version "1.2.6")
119 (source (origin
120 (method url-fetch)
121 (uri (string-append "http://www.remlab.net/files/miredo/miredo-"
122 version ".tar.xz"))
123 (sha256
124 (base32
125 "0j9ilig570snbmj48230hf7ms8kvcwi2wblycqrmhh85lksd49ps"))))
126 (build-system gnu-build-system)
127 (arguments
128 '(#:phases
129 (modify-phases %standard-phases
130 ;; The checkconf test in src/ requires network access.
131 (add-before
132 'check 'disable-checkconf-test
133 (lambda _
134 (substitute* "src/Makefile"
135 (("^TESTS = .*") "TESTS = \n")))))))
136 (home-page "http://www.remlab.net/miredo/")
137 (synopsis "Teredo IPv6 tunneling software")
138 (description
139 "Miredo is an implementation (client, relay, server) of the Teredo
140 specification, which provides IPv6 Internet connectivity to IPv6 enabled hosts
141 residing in IPv4-only networks, even when they are behind a NAT device.")
142 (license license:gpl2+)))
143
144 (define-public socat
145 (package
146 (name "socat")
147 (version "1.7.3.2")
148 (source (origin
149 (method url-fetch)
150 (uri (string-append
151 "http://www.dest-unreach.org/socat/download/socat-"
152 version ".tar.bz2"))
153 (sha256
154 (base32
155 "0lcj6zpra33xhgvhmz9l3cqz10v8ybafb8dd1yqkwf1rhy01ymp3"))))
156 (build-system gnu-build-system)
157 (arguments '(#:tests? #f)) ;no 'check' phase
158 (inputs `(("openssl" ,openssl)))
159 (home-page "http://www.dest-unreach.org/socat/")
160 (synopsis
161 "Open bidirectional communication channels from the command line")
162 (description
163 "socat is a relay for bidirectional data transfer between two independent
164 data channels---files, pipes, devices, sockets, etc. It can create
165 \"listening\" sockets, named pipes, and pseudo terminals.
166
167 socat can be used, for instance, as TCP port forwarder, as a shell interface
168 to UNIX sockets, IPv6 relay, for redirecting TCP oriented programs to a serial
169 line, to logically connect serial lines on different computers, or to
170 establish a relatively secure environment (su and chroot) for running client
171 or server shell scripts with network connections.")
172 (license license:gpl2)))
173
174 (define-public tcp-wrappers
175 (package
176 (name "tcp-wrappers")
177 (version "7.6")
178 (source (origin
179 (method url-fetch)
180 (uri (string-append
181 "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_"
182 version ".tar.gz"))
183 (sha256
184 (base32
185 "0p9ilj4v96q32klavx0phw9va21fjp8vpk11nbh6v2ppxnnxfhwm"))))
186 (build-system gnu-build-system)
187 (arguments
188 `(#:phases
189 (modify-phases %standard-phases
190 (delete 'configure) ; there is no configure script
191 (delete 'check) ; there are no tests
192 (replace 'build
193 (lambda _
194 (chmod "." #o755)
195 ;; Upstream doesn't generate a shared library. So we have to do it.
196 (setenv "CC" "gcc -fno-builtin -fPIC")
197 (substitute* "Makefile"
198 (("^(all[^\n]*)" line) (string-append line " libwrap.so\n
199 libwrap.so: $(LIB_OBJ)\n
200 \tgcc -shared $^ -o $@\n")))
201 ;; Deal with some gcc breakage.
202 (substitute* "percent_m.c"
203 (("extern char .sys_errlist.*;") ""))
204 (substitute* "scaffold.c"
205 (("extern char .malloc.*;") ""))
206 ;; This, believe it or not, is the recommended way to build!
207 (zero? (system* "make" "REAL_DAEMON_DIR=/etc" "linux"))))
208 ;; There is no make install stage, so we have to do it ourselves.
209 (replace 'install
210 (lambda _
211 (let ((out (assoc-ref %outputs "out"))
212 (man-pages `("hosts_access.3"
213 "hosts_access.5"
214 "hosts_options.5"
215 "tcpd.8"
216 "tcpdchk.8"
217 "tcpdmatch.8"))
218 (libs `("libwrap.a"
219 "libwrap.so"))
220 (headers `("tcpd.h"))
221 (bins `("safe_finger"
222 "tcpd"
223 "tcpdchk"
224 "tcpdmatch"
225 "try-from")))
226 (for-each
227 (lambda (x)
228 (install-file x (string-append out "/include")))
229 headers)
230 (for-each
231 (lambda (x)
232 (install-file x (string-append out "/share/man/man"
233 (string-take-right x 1))))
234 man-pages)
235 (for-each
236 (lambda (x)
237 (install-file x (string-append out "/lib/")))
238 libs)
239 (for-each
240 (lambda (x)
241 (install-file x (string-append out "/bin/")))
242 bins)))))))
243 (home-page "http://www.porcupine.org")
244 (synopsis "Monitor and filter incoming requests for network services")
245 (description "With this package you can monitor and filter incoming requests for
246 network services. It includes a library which may be used by daemons to
247 transparently check connection attempts against an access control list.")
248 (license (license:non-copyleft "file://DISCLAIMER"
249 "See the file DISCLAIMER in the distribution."))))
250
251
252 (define-public zeromq
253 (package
254 (name "zeromq")
255 (version "4.0.7")
256 (source (origin
257 (method url-fetch)
258 (uri (string-append "http://download.zeromq.org/zeromq-"
259 version ".tar.gz"))
260 (sha256
261 (base32
262 "00vvwhgcdr1lva2pavicvy92iad0hj8cf71n702hv6blw1kjj2z0"))))
263 (build-system gnu-build-system)
264 (home-page "http://zeromq.org")
265 (synopsis "Library for message-based applications")
266 (description
267 "The 0MQ lightweight messaging kernel is a library which extends the
268 standard socket interfaces with features traditionally provided by specialized
269 messaging middle-ware products. 0MQ sockets provide an abstraction of
270 asynchronous message queues, multiple messaging patterns, message
271 filtering (subscriptions), seamless access to multiple transport protocols and
272 more.")
273 (license license:lgpl3+)))
274
275 (define-public czmq
276 (package
277 (name "czmq")
278 (version "4.1.0")
279 (source (origin
280 (method url-fetch)
281 (uri (string-append
282 "https://github.com/zeromq/" name
283 "/releases/download/v" version
284 "/" name "-" version ".tar.gz"))
285 (sha256
286 (base32
287 "04gwf61rijwm6b2wblwv8gky1gdrbfmg1d19hf72kdc691ds7vrv"))))
288 (build-system gnu-build-system)
289 (arguments
290 '(;; TODO Tests fail for some reason:
291 ;; * zauth: OK
292 ;; * zbeacon: OK (skipping test, no UDP broadcasting)
293 ;; E: (czmq_selftest) 18-02-24 16:25:52 No broadcast interface found, (ZSYS_INTERFACE=lo)
294 ;; make[2]: *** [Makefile:2245: check-local] Segmentation fault
295 ;; make[2]: Leaving directory '/tmp/guix-build-czmq-4.1.0.drv-0/czmq-4.1.0'
296 ;; make[1]: *** [Makefile:2032: check-am] Error 2
297 ;; make[1]: Leaving directory '/tmp/guix-build-czmq-4.1.0.drv-0/czmq-4.1.0'
298 ;; make: *** [Makefile:1588: check-recursive] Error 1
299 ;; phase `check' failed after 19.4 seconds
300 #:tests? #f
301 #:configure-flags '("--enable-drafts")))
302 (inputs
303 `(("zeromq" ,zeromq)))
304 (home-page "http://zeromq.org")
305 (synopsis "High-level C bindings for ØMQ")
306 (description
307 "czmq provides bindings for the ØMQ core API that hides the differences
308 between different versions of ØMQ.")
309 (license license:mpl2.0)))
310
311 (define-public librdkafka
312 (package
313 (name "librdkafka")
314 (version "0.9.1")
315 (source (origin
316 (method url-fetch)
317 (uri (string-append
318 "https://github.com/edenhill/librdkafka/archive/"
319 version ".tar.gz"))
320 (file-name (string-append name "-" version ".tar.gz"))
321 (sha256
322 (base32
323 "10ldx7g7ymmg17snzx78vy4n8ma1rjx0agzi34g15j2fk867xmas"))))
324 (build-system gnu-build-system)
325 (arguments
326 '(#:phases
327 (modify-phases %standard-phases
328 (replace 'configure
329 ;; its custom configure script doesn't understand 'CONFIG_SHELL'.
330 (lambda* (#:key outputs #:allow-other-keys)
331 (let ((out (assoc-ref outputs "out")))
332 ;; librdkafka++.so lacks RUNPATH for librdkafka.so
333 (setenv "LDFLAGS"
334 (string-append "-Wl,-rpath=" out "/lib"))
335 (zero? (system* "./configure"
336 (string-append "--prefix=" out)))))))))
337 (native-inputs
338 `(("python" ,python-wrapper)))
339 (propagated-inputs
340 `(("zlib" ,zlib))) ; in the Libs.private field of rdkafka.pc
341 (home-page "https://github.com/edenhill/librdkafka")
342 (synopsis "Apache Kafka C/C++ client library")
343 (description
344 "librdkafka is a C library implementation of the Apache Kafka protocol,
345 containing both Producer and Consumer support.")
346 (license license:bsd-2)))
347
348 (define-public libndp
349 (package
350 (name "libndp")
351 (version "1.6")
352 (source (origin
353 (method url-fetch)
354 (uri (string-append "http://libndp.org/files/"
355 name "-" version ".tar.gz"))
356 (sha256
357 (base32
358 "03mczwrxqbp54msafxzzyhaazkvjdwm2kipjkrb5xg8kw22glz8c"))))
359 (build-system gnu-build-system)
360 (home-page "http://libndp.org/")
361 (synopsis "Library for Neighbor Discovery Protocol")
362 (description
363 "libndp contains a library which provides a wrapper for IPv6 Neighbor
364 Discovery Protocol. It also provides a tool named ndptool for sending and
365 receiving NDP messages.")
366 (license license:lgpl2.1+)))
367
368 (define-public ethtool
369 (package
370 (name "ethtool")
371 (version "4.15")
372 (source (origin
373 (method url-fetch)
374 (uri (string-append "mirror://kernel.org/software/network/"
375 name "/" name "-" version ".tar.xz"))
376 (sha256
377 (base32
378 "06pr3s7wg2pbvfbf7js61bgh3caff4qf50nqqk3cgz9z90rgvxvi"))))
379 (build-system gnu-build-system)
380 (home-page "https://www.kernel.org/pub/software/network/ethtool/")
381 (synopsis "Display or change Ethernet device settings")
382 (description
383 "ethtool can be used to query and change settings such as speed,
384 auto-negotiation and checksum offload on many network devices, especially
385 Ethernet devices.")
386 (license license:gpl2)))
387
388 (define-public ifstatus
389 (package
390 (name "ifstatus")
391 (version "1.1.0")
392 (source (origin
393 (method url-fetch)
394 (uri (string-append "mirror://sourceforge/ifstatus/ifstatus/"
395 "ifstatus%20v" version "/ifstatus-v"
396 version ".tar.gz"))
397 (sha256
398 (base32
399 "045cbsq9ps32j24v8y5hpyqxnqn9mpaf3mgvirlhgpqyb9jsia0c"))
400 (modules '((guix build utils)))
401 (snippet
402 '(begin
403 (substitute* "Main.h"
404 (("#include <stdio.h>")
405 "#include <stdio.h>\n#include <stdlib.h>"))
406 #t))))
407 (build-system gnu-build-system)
408 (arguments
409 '(#:tests? #f ; no "check" target
410 #:phases
411 (modify-phases %standard-phases
412 (delete 'configure) ; no configure script
413 (replace 'install
414 (lambda* (#:key outputs #:allow-other-keys)
415 (let* ((out (assoc-ref outputs "out"))
416 (bin (string-append out "/bin")))
417 (mkdir-p bin)
418 (copy-file "ifstatus"
419 (string-append bin "/ifstatus"))))))))
420 (inputs `(("ncurses" ,ncurses)))
421 (home-page "http://ifstatus.sourceforge.net/graphic/index.html")
422 (synopsis "Text based network interface status monitor")
423 (description
424 "IFStatus is a simple, easy-to-use program for displaying commonly
425 needed/wanted real-time traffic statistics of multiple network
426 interfaces, with a simple and efficient view on the command line. It is
427 intended as a substitute for the PPPStatus and EthStatus projects.")
428 (license license:gpl2+)))
429
430 (define-public nload
431 (package
432 (name "nload")
433 (version "0.7.4")
434 (source (origin
435 (method url-fetch)
436 (uri (string-append "mirror://sourceforge/nload/nload/" version
437 "/nload-" version ".tar.gz"))
438 (sha256
439 (base32
440 "1rb9skch2kgqzigf19x8bzk211jdfjfdkrcvaqyj89jy2pkm3h61"))))
441 (build-system gnu-build-system)
442 (inputs `(("ncurses" ,ncurses)))
443 (home-page "http://www.roland-riegel.de/nload/")
444 (synopsis "Realtime console network usage monitor")
445 (description
446 "Nload is a console application which monitors network traffic and
447 bandwidth usage in real time. It visualizes the in- and outgoing traffic using
448 two graphs, and provides additional info like total amount of transferred data
449 and min/max network usage.")
450 (license license:gpl2+)))
451
452 (define-public iodine
453 (package
454 (name "iodine")
455 (version "0.7.0")
456 (source (origin
457 (method url-fetch)
458 (uri (string-append "http://code.kryo.se/" name "/"
459 name "-" version ".tar.gz"))
460 (sha256
461 (base32
462 "0gh17kcxxi37k65zm4gqsvbk3aw7yphcs3c02pn1c4s2y6n40axd"))))
463 (build-system gnu-build-system)
464 (arguments
465 '(#:phases
466 (modify-phases %standard-phases
467 (delete 'configure)
468 (add-before 'build 'fix-ifconfig-path
469 ;; This package works only with the net-tools version of ifconfig.
470 (lambda* (#:key inputs #:allow-other-keys)
471 (substitute* "src/tun.c"
472 (("PATH=[^ ]* ")
473 (string-append (assoc-ref inputs "net-tools") "/bin/")))))
474 (add-before 'check 'delete-failing-tests
475 ;; Avoid https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802105.
476 (lambda _
477 (substitute* "tests/common.c"
478 (("tcase_add_test\\(tc, \
479 test_parse_format_ipv(4(|_listen_all|_mapped_ipv6)|6)\\);")
480 "")))))
481 #:make-flags (list "CC=gcc"
482 (string-append "prefix=" (assoc-ref %outputs "out")))
483 #:test-target "test"))
484 (inputs `(("net-tools" ,net-tools)
485 ("zlib" ,zlib)))
486 (native-inputs `(("check" ,check)
487 ("pkg-config" ,pkg-config)))
488 (home-page "http://code.kryo.se/iodine/")
489 (synopsis "Tunnel IPv4 data through a DNS server")
490 (description "Iodine tunnels IPv4 data through a DNS server. This
491 can be useful in different situations where internet access is firewalled, but
492 DNS queries are allowed. The bandwidth is asymmetrical, with limited upstream
493 and up to 1 Mbit/s downstream.")
494 ;; src/md5.[ch] is released under the zlib license
495 (license (list license:isc license:zlib))))
496
497 (define-public whois
498 (package
499 (name "whois")
500 (version "5.3.0")
501 (source
502 (origin
503 (method url-fetch)
504 (uri (string-append "mirror://debian/pool/main/w/whois/"
505 name "_" version ".tar.xz"))
506 (sha256
507 (base32
508 "08sp2gzv09rar1a5mnfmbc24pqvhpqqmz2hnmv436n7v7d09qy2d"))))
509 (build-system gnu-build-system)
510 (arguments
511 `(#:tests? #f ; no test suite
512 #:make-flags (list "CC=gcc"
513 (string-append "prefix=" (assoc-ref %outputs "out")))
514 #:phases
515 (modify-phases %standard-phases
516 (delete 'configure) ; no configure script
517 (add-before 'build 'setenv
518 (lambda _
519 (setenv "HAVE_ICONV" "1")
520 #t)))))
521 (inputs
522 ;; TODO: Switch to libidn2 when >= 2.0.3 is ungrafted in master.
523 `(("libidn" ,libidn)))
524 (native-inputs
525 `(("gettext" ,gettext-minimal)
526 ("perl" ,perl)
527 ("pkg-config" ,pkg-config)))
528 (synopsis "Intelligent client for the WHOIS directory service")
529 (description
530 "whois searches for an object in a @dfn{WHOIS} (RFC 3912) database.
531 It is commonly used to look up the registered users or assignees of an Internet
532 resource, such as a domain name, an IP address block, or an autonomous system.
533 It can automatically select the appropriate server for most queries.
534
535 For historical reasons, this package also includes @command{mkpasswd}, which
536 encrypts passwords using @code{crypt(3)} and is unrelated to the Expect command
537 of the same name.")
538 (home-page "https://github.com/rfc1036/whois")
539 (license license:gpl2+)))
540
541 (define-public wireshark
542 (package
543 (name "wireshark")
544 (version "2.4.5")
545 (source
546 (origin
547 (method url-fetch)
548 (uri (string-append "https://www.wireshark.org/download/src/wireshark-"
549 version ".tar.xz"))
550 (sha256
551 (base32
552 "1mvgy67rvnwj2kbc43s4il81jvz5ai0bx2j3j2js7x50zclyrcmk"))))
553 (build-system gnu-build-system)
554 (inputs `(("c-ares" ,c-ares)
555 ("glib" ,glib)
556 ("gnutls" ,gnutls)
557 ("libcap" ,libcap)
558 ("libgcrypt" ,libgcrypt)
559 ("libnl" ,libnl)
560 ("libpcap" ,libpcap)
561 ("libssh" ,libssh)
562 ("libxml2" ,libxml2)
563 ("lua" ,lua-5.2) ;Lua 5.3 unsupported
564 ("krb5" ,mit-krb5)
565 ("openssl" ,openssl)
566 ("portaudio" ,portaudio)
567 ("qtbase" ,qtbase)
568 ("sbc" ,sbc)
569 ("zlib" ,zlib)))
570 (native-inputs `(("perl" ,perl)
571 ("pkg-config" ,pkg-config)
572 ("python" ,python-wrapper)
573 ("qttools" ,qttools)))
574 (arguments
575 `(#:configure-flags
576 (list (string-append "--with-c-ares=" (assoc-ref %build-inputs "c-ares"))
577 (string-append "--with-krb5=" (assoc-ref %build-inputs "krb5"))
578 (string-append "--with-libcap=" (assoc-ref %build-inputs "libcap"))
579 (string-append "--with-libssh=" (assoc-ref %build-inputs "libssh"))
580 (string-append "--with-lua=" (assoc-ref %build-inputs "lua"))
581 (string-append "--with-pcap=" (assoc-ref %build-inputs "libpcap"))
582 (string-append "--with-portaudio="
583 (assoc-ref %build-inputs "portaudio"))
584 (string-append "--with-sbc=" (assoc-ref %build-inputs "sbc"))
585 (string-append "--with-ssl=" (assoc-ref %build-inputs "openssl"))
586 (string-append "--with-zlib=" (assoc-ref %build-inputs "zlib")))))
587 (synopsis "Network traffic analyzer")
588 (description "Wireshark is a network protocol analyzer, or @dfn{packet
589 sniffer}, that lets you capture and interactively browse the contents of
590 network frames.")
591 (home-page "https://www.wireshark.org/")
592 (license license:gpl2+)))
593
594 (define-public fping
595 (package
596 (name "fping")
597 (version "4.0")
598 (source
599 (origin
600 (method url-fetch)
601 (uri (string-append "https://fping.org/dist/fping-"
602 version ".tar.gz"))
603 (sha256
604 (base32
605 "1kp81wchi79l8z8rrj602fpjrd8bi84y3i7fsaclzlwap5943sv7"))))
606 (build-system gnu-build-system)
607 (home-page "http://fping.org/")
608 (synopsis "Send ICMP ECHO_REQUEST packets to network hosts")
609 (description
610 "fping is a ping like program which uses the Internet Control Message
611 Protocol (ICMP) echo request to determine if a target host is responding.
612 fping differs from ping in that you can specify any number of targets on the
613 command line, or specify a file containing the lists of targets to ping.
614 Instead of sending to one target until it times out or replies, fping will
615 send out a ping packet and move on to the next target in a round-robin
616 fashion.")
617 (license license:expat)))
618
619 (define-public httping
620 (package
621 (name "httping")
622 (version "2.5")
623 (source
624 (origin
625 (method url-fetch)
626 (uri (string-append "https://www.vanheusden.com/httping/httping-"
627 version ".tgz"))
628 (sha256
629 (base32
630 "1y7sbgkhgadmd93x1zafqc4yp26ssiv16ni5bbi9vmvvdl55m29y"))))
631 (build-system gnu-build-system)
632 (native-inputs
633 `(("gettext" ,gettext-minimal)))
634 (inputs
635 `(("fftw" ,fftw)
636 ("ncurses" ,ncurses)
637 ("openssl" ,openssl)))
638 (arguments
639 `(#:make-flags (list "CC=gcc"
640 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
641 "PREFIX=")
642 #:tests? #f)) ; no tests
643 (home-page "https://www.vanheusden.com/httping/")
644 (synopsis "Web server latency and throughput monitor")
645 (description
646 "httping measures how long it takes to connect to a web server, send an
647 HTTP(S) request, and receive the reply headers. It is somewhat similar to
648 @command{ping}, but can be used even in cases where ICMP traffic is blocked
649 by firewalls or when you want to monitor the response time of the actual web
650 application stack itself.")
651 (license license:gpl2))) ; with permission to link with OpenSSL
652
653 (define-public httpstat
654 (package
655 (name "httpstat")
656 (version "1.2.1")
657 (source
658 (origin
659 (method url-fetch)
660 (uri (pypi-uri "httpstat" version))
661 (sha256
662 (base32
663 "1chw2nk56vaq87aba012a270k9na06hfx1pfbsrc3jfvlc2kb9hb"))))
664 (build-system python-build-system)
665 (inputs `(("curl" ,curl)))
666 (arguments
667 '(#:phases
668 (modify-phases %standard-phases
669 (add-before 'build 'fix-curl-path
670 (lambda* (#:key inputs #:allow-other-keys)
671 (substitute* "httpstat.py"
672 (("ENV_CURL_BIN.get\\('curl'\\)")
673 (string-append "ENV_CURL_BIN.get('"
674 (assoc-ref inputs "curl")
675 "/bin/curl')"))))))))
676 (home-page "https://github.com/reorx/httpstat")
677 (synopsis "Visualize curl statistics")
678 (description
679 "@command{httpstat} is a tool to visualize statistics from the
680 @command{curl} HTTP client. It acts as a wrapper for @command{curl} and
681 prints timing information for each step of the HTTP request (DNS lookup,
682 TCP connection, TLS handshake and so on) in the terminal.")
683 (license license:expat)))
684
685 (define-public bwm-ng
686 (package
687 (name "bwm-ng")
688 (version "0.6.1")
689 (source
690 (origin
691 (method url-fetch)
692 (uri (string-append "https://www.gropp.org/bwm-ng/bwm-ng-"
693 version ".tar.gz"))
694 (sha256
695 (base32
696 "1w0dwpjjm9pqi613i8glxrgca3rdyqyp3xydzagzr5ndc34z6z02"))))
697 (build-system gnu-build-system)
698 (inputs `(("ncurses" ,ncurses)))
699 (synopsis "Console based live network and disk I/O bandwidth monitor")
700 (description "Bandwidth Monitor NG is a small and simple console based
701 live network and disk I/O bandwidth monitor.")
702 (home-page "https://www.gropp.org/?id=projects&sub=bwm-ng")
703 (license license:gpl2)))
704
705 (define-public aircrack-ng
706 (package
707 (name "aircrack-ng")
708 (version "1.2-rc4")
709 (source
710 (origin
711 (method url-fetch)
712 (uri (string-append "http://download.aircrack-ng.org/aircrack-ng-"
713 version ".tar.gz"))
714 (sha256
715 (base32
716 "0dpzx9kddxpgzmgvdpl3rxn0jdaqhm5wxxndp1xd7d75mmmc2fnr"))))
717 (build-system gnu-build-system)
718 (native-inputs
719 `(("pkg-config" ,pkg-config)))
720 (inputs
721 `(("libgcrypt" ,libgcrypt)
722 ("libnl" ,libnl)
723 ("ethtool" ,ethtool)
724 ("pcre" ,pcre)
725 ("sqlite" ,sqlite)
726 ("zlib" ,zlib)))
727 (arguments
728 `(#:make-flags `("sqlite=true"
729 "gcrypt=true"
730 "libnl=true"
731 "pcre=true"
732 "experimental=true" ;build wesside-ng, etc.
733 "AVX2FLAG=N" "AVX1FLAG=N"
734 ,,@(match (%current-system)
735 ((or "x86_64-linux" "i686-linux")
736 `("SSEFLAG=Y"))
737 (_
738 `("NEWSSE=false")))
739 ,(string-append "prefix=" %output))
740 #:phases (modify-phases %standard-phases
741 (delete 'configure) ;no configure phase
742 (add-after 'build 'absolutize-tools
743 (lambda* (#:key inputs #:allow-other-keys)
744 (let ((ethtool (string-append (assoc-ref inputs "ethtool")
745 "/sbin/ethtool")))
746 (substitute* "scripts/airmon-ng"
747 (("\\[ ! -x \"\\$\\(command -v ethtool 2>&1)\" \\]")
748 (string-append "! " ethtool " --version "
749 ">/dev/null 2>&1"))
750 (("\\$\\(ethtool")
751 (string-append "$(" ethtool)))
752 #t))))))
753 (home-page "http://www.aircrack-ng.org")
754 (synopsis "Assess WiFi network security")
755 (description
756 "Aircrack-ng is a complete suite of tools to assess WiFi network
757 security. It focuses on different areas of WiFi security: monitoring,
758 attacking, testing, and cracking. All tools are command-line driven, which
759 allows for heavy scripting.")
760 (license (list license:gpl2+ license:bsd-3))))
761
762 (define-public perl-net-dns
763 (package
764 (name "perl-net-dns")
765 (version "1.15")
766 (source
767 (origin
768 (method url-fetch)
769 (uri (string-append
770 "mirror://cpan/authors/id/N/NL/NLNETLABS/Net-DNS-"
771 version
772 ".tar.gz"))
773 (sha256
774 (base32
775 "1l31kqrgjzq8zgpr86z12x550px5zpn563gmnja6m14b8fk6pm0s"))))
776 (build-system perl-build-system)
777 (inputs
778 `(("perl-digest-hmac" ,perl-digest-hmac)))
779 (home-page "http://search.cpan.org/dist/Net-DNS")
780 (synopsis
781 "Perl Interface to the Domain Name System")
782 (description "Net::DNS is the Perl Interface to the Domain Name System.")
783 (license license:x11)))
784
785 (define-public perl-socket6
786 (package
787 (name "perl-socket6")
788 (version "0.28")
789 (source
790 (origin
791 (method url-fetch)
792 (uri (string-append
793 "mirror://cpan/authors/id/U/UM/UMEMOTO/Socket6-"
794 version
795 ".tar.gz"))
796 (sha256
797 (base32
798 "11j5jzqbzmwlws9zals43ry2f1nw9qy6im7yhn9ck5rikywrmm5z"))))
799 (build-system perl-build-system)
800 (arguments
801 `(#:phases
802 (modify-phases %standard-phases
803 (replace 'configure
804 (lambda* (#:key outputs #:allow-other-keys)
805 (let* ((out (assoc-ref outputs "out"))
806 (args `("Makefile.PL"
807 ,(string-append "PREFIX=" out)
808 "INSTALLDIRS=site")))
809 (setenv "CONFIG_SHELL" (which "sh"))
810 (zero? (apply system* "perl" args))))))))
811 (home-page "http://search.cpan.org/dist/Socket6")
812 (synopsis
813 "IPv6 related part of the C socket.h defines and structure manipulators for Perl")
814 (description "Socket6 binds the IPv6 related part of the C socket header
815 definitions and structure manipulators for Perl.")
816 (license license:bsd-3)))
817
818 (define-public perl-net-dns-resolver-programmable
819 (package
820 (name "perl-net-dns-resolver-programmable")
821 (version "v0.003")
822 (source
823 (origin
824 (method url-fetch)
825 (uri (string-append
826 "mirror://cpan/authors/id/J/JM/JMEHNLE/net-dns-resolver-programmable/"
827 "Net-DNS-Resolver-Programmable-" version ".tar.gz"))
828 (sha256
829 (base32
830 "1v3nl2kaj4fs55n1617n53q8sa3mir06898vpy1rq98zjih24h4d"))
831 (patches
832 (search-patches "perl-net-dns-resolver-programmable-fix.patch"))))
833 (build-system perl-build-system)
834 (native-inputs
835 `(("perl-module-build" ,perl-module-build)))
836 (inputs `(("perl-net-dns" ,perl-net-dns)))
837 (home-page
838 "http://search.cpan.org/dist/Net-DNS-Resolver-Programmable")
839 (synopsis
840 "Programmable DNS resolver class for offline emulation of DNS")
841 (description "Net::DNS::Resolver::Programmable is a programmable DNS resolver for
842 offline emulation of DNS.")
843 (license license:perl-license)))
844
845 (define-public perl-netaddr-ip
846 (package
847 (name "perl-netaddr-ip")
848 (version "4.079")
849 (source
850 (origin
851 (method url-fetch)
852 (uri (string-append
853 "mirror://cpan/authors/id/M/MI/MIKER/NetAddr-IP-"
854 version
855 ".tar.gz"))
856 (sha256
857 (base32
858 "1rx0dinrz9fk9qcg4rwqq5n1dm3xv2arymixpclcv2q2nzgq4npc"))))
859 (build-system perl-build-system)
860 (arguments
861 `(#:phases
862 (modify-phases %standard-phases
863 (replace 'configure
864 (lambda* (#:key outputs #:allow-other-keys)
865 (let* ((out (assoc-ref outputs "out"))
866 (args `("Makefile.PL"
867 ,(string-append "PREFIX=" out)
868 "INSTALLDIRS=site")))
869 (setenv "CONFIG_SHELL" (which "sh"))
870 (zero? (apply system* "perl" args))))))))
871 (home-page
872 "http://search.cpan.org/dist/NetAddr-IP")
873 (synopsis
874 "Manages IPv4 and IPv6 addresses and subnets")
875 (description "NetAddr::IP manages IPv4 and IPv6 addresses and subsets.")
876 (license license:perl-license)))
877
878 (define-public perl-net-patricia
879 (package
880 (name "perl-net-patricia")
881 (version "1.22")
882 (source
883 (origin
884 (method url-fetch)
885 (uri (string-append
886 "mirror://cpan/authors/id/G/GR/GRUBER/Net-Patricia-"
887 version
888 ".tar.gz"))
889 (sha256
890 (base32
891 "0ln5f57vc8388kyh9vhx2infrdzfhbpgyby74h1qsnhwds95m0vh"))))
892 (build-system perl-build-system)
893 (inputs
894 `(("perl-net-cidr-lite" ,perl-net-cidr-lite)
895 ("perl-socket6" ,perl-socket6)))
896 (home-page
897 "http://search.cpan.org/dist/Net-Patricia")
898 (synopsis
899 "Patricia Trie Perl module for fast IP address lookups")
900 (description
901 "Net::Patricia does IP address lookups quickly in Perl.")
902 ;; The bindings are licensed under GPL2 or later.
903 ;; libpatricia is licensed under 2-clause BSD.
904 (license (list license:gpl2+ license:bsd-2))))
905
906 (define-public perl-net-cidr-lite
907 (package
908 (name "perl-net-cidr-lite")
909 (version "0.21")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (string-append
914 "mirror://cpan/authors/id/D/DO/DOUGW/Net-CIDR-Lite-"
915 version
916 ".tar.gz"))
917 (sha256
918 (base32
919 "14shj73zbqmfjbp0qz1fs9j4p2dpvz5hfkm4qfdjbydflbl2b8fg"))))
920 (build-system perl-build-system)
921 (home-page
922 "http://search.cpan.org/dist/Net-CIDR-Lite")
923 (synopsis
924 "Perl extension for merging IPv4 or IPv6 CIDR addresses")
925 (description "Net::CIDR::Lite merges IPv4 or IPv6 CIDR addresses.")
926 (license license:gpl1+)))
927
928 ;; TODO: Use the geolite-mirror-simple.pl script from the example
929 ;; directory to stay current with the databases. How?
930 (define-public perl-geo-ip
931 (package
932 (name "perl-geo-ip")
933 (version "1.51")
934 (source
935 (origin
936 (method url-fetch)
937 (uri (string-append
938 "mirror://cpan/authors/id/M/MA/MAXMIND/Geo-IP-"
939 version
940 ".tar.gz"))
941 (sha256
942 (base32
943 "1fka8fr7fw6sh3xa9glhs1zjg3s2gfkhi7n7da1l2m2wblqj0c0n"))))
944 (build-system perl-build-system)
945 (home-page "http://search.cpan.org/dist/Geo-IP")
946 (synopsis
947 "Look up location and network information by IP Address in Perl")
948 (description "The Perl module 'Geo::IP'. It looks up location and network
949 information by IP Address.")
950 (license license:perl-license)))
951
952 (define-public perl-io-socket-inet6
953 (package
954 (name "perl-io-socket-inet6")
955 (version "2.72")
956 (source
957 (origin
958 (method url-fetch)
959 (uri (string-append
960 "mirror://cpan/authors/id/S/SH/SHLOMIF/IO-Socket-INET6-"
961 version
962 ".tar.gz"))
963 (sha256
964 (base32
965 "1fqypz6qa5rw2d5y2zq7f49frwra0aln13nhq5gi514j2zx21q45"))))
966 (build-system perl-build-system)
967 (native-inputs
968 `(("perl-module-build" ,perl-module-build)
969 ("perl-test-pod" ,perl-test-pod)
970 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
971 (inputs `(("perl-socket6" ,perl-socket6)))
972 (arguments `(;; Need network socket API
973 #:tests? #f))
974 (home-page
975 "http://search.cpan.org/dist/IO-Socket-INET6")
976 (synopsis
977 "Perl object interface for AF_INET/AF_INET6 domain sockets")
978 (description "IO::Socket::INET6 is an interface for AF_INET/AF_INET6 domain
979 sockets in Perl.")
980 (license license:perl-license)))
981
982 (define-public libproxy
983 (package
984 (name "libproxy")
985 (version "0.4.15")
986 (source (origin
987 (method url-fetch)
988 (uri (string-append "https://github.com/libproxy/libproxy/"
989 "releases/download/" version "/libproxy-"
990 version ".tar.xz"))
991 (sha256
992 (base32
993 "0kvdrazlzwia876w988cmlypp253gwy6idlh8mjk958c29jb8kb5"))))
994 (build-system cmake-build-system)
995 (native-inputs
996 `(("pkg-config" ,pkg-config)))
997 (inputs
998 `(("dbus" ,dbus)
999 ("zlib" ,zlib)
1000 ("network-manager" ,network-manager)))
1001 (arguments
1002 `(#:phases
1003 (modify-phases %standard-phases
1004 (replace 'check
1005 (lambda _
1006 (zero? (system* "ctest" "-E" "url-test")))))))
1007 (synopsis "Library providing automatic proxy configuration management")
1008 (description "Libproxy handles the details of HTTP/HTTPS proxy
1009 configuration for applications across all scenarios. Applications using
1010 libproxy only have to specify which proxy to use.")
1011 (home-page "https://libproxy.github.io/libproxy")
1012 (license license:lgpl2.1+)))
1013
1014 (define-public proxychains-ng
1015 (package
1016 (name "proxychains-ng")
1017 (version "4.12")
1018 (source (origin
1019 (method url-fetch)
1020 (uri (string-append "https://github.com/rofl0r/" name "/releases/"
1021 "download/v" version "/" name "-" version
1022 ".tar.xz"))
1023 (sha256
1024 (base32
1025 "0kiss3ih6cwayzvqi5cx4kw4vh7r2kfxlbgk56v1f1066ncm8aj8"))))
1026 (build-system gnu-build-system)
1027 (arguments
1028 `(#:tests? #f ; there are no tests
1029 #:make-flags '("CC=gcc")
1030 #:phases
1031 (modify-phases %standard-phases
1032 (add-after 'unpack 'fix-configure-script
1033 (lambda _
1034 ;; The configure script is very intolerant to unknown arguments,
1035 ;; such as "CONFIG_SHELL".
1036 (substitute* "configure"
1037 (("\\*\\) break ;;" line)
1038 (string-append "[A-Z]*) shift ;;\n"
1039 line)))
1040 #t)))))
1041 (synopsis "Redirect any TCP connection through a proxy or proxy chain")
1042 (description "Proxychains-ng is a preloader which hooks calls to sockets
1043 in dynamically linked programs and redirects them through one or more SOCKS or
1044 HTTP proxies.")
1045 (home-page "https://github.com/rofl0r/proxychains-ng")
1046 (license license:gpl2+)))
1047
1048 (define-public enet
1049 (package
1050 (name "enet")
1051 (version "1.3.13")
1052 (source (origin
1053 (method url-fetch)
1054 (uri (string-append "http://enet.bespin.org/download/"
1055 name "-" version ".tar.gz"))
1056 (sha256
1057 (base32
1058 "0p53mnmjbm56wizwraznynx13fcibcxiqny110dp6a5a3w174q73"))))
1059 (build-system gnu-build-system)
1060 (native-inputs
1061 `(("pkg-config" ,pkg-config)))
1062 (synopsis
1063 "Network communication layer on top of UDP")
1064 (description
1065 "ENet's purpose is to provide a relatively thin, simple and robust network
1066 communication layer on top of UDP. The primary feature it provides is optional
1067 reliable, in-order delivery of packets. ENet omits certain higher level
1068 networking features such as authentication, server discovery, encryption, or
1069 other similar tasks that are particularly application specific so that the
1070 library remains flexible, portable, and easily embeddable.")
1071 (home-page "http://enet.bespin.org")
1072 (license license:expat)))
1073
1074 (define-public sslh
1075 (package
1076 (name "sslh")
1077 (version "1.19c")
1078 (source (origin
1079 (method url-fetch)
1080 (uri (string-append "https://github.com/yrutschle/sslh/archive/v"
1081 version ".tar.gz"))
1082 (file-name (string-append name "-" version ".tar.gz"))
1083 (sha256
1084 (base32
1085 "0pd8hifa9h0rm7vms3k6ic1k29xigrlv2idc5wgcafmb1v1243di"))))
1086 (build-system gnu-build-system)
1087 (native-inputs
1088 `(;; Test dependencies.
1089 ("lcov" ,lcov)
1090 ("perl" ,perl)
1091 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
1092 ("perl-socket6" ,perl-socket6)
1093 ("psmisc" ,psmisc)
1094 ("valgrind" ,valgrind)))
1095 (inputs
1096 `(("libcap" ,libcap)
1097 ("libconfig" ,libconfig)
1098 ("pcre" ,pcre)
1099 ("tcp-wrappers" ,tcp-wrappers)))
1100 (arguments
1101 '(#:phases
1102 (modify-phases %standard-phases
1103 (delete 'configure) ; no configure script
1104 (add-before 'check 'fix-tests
1105 (lambda _
1106 (substitute* "./t"
1107 (("\"/tmp") "$ENV{\"TMPDIR\"} . \"")
1108 ;; The Guix build environment lacks ‘ip6-localhost’.
1109 (("ip6-localhost") "localhost"))
1110 #t))
1111 ;; Many of these files are mentioned in the man page. Install them.
1112 (add-after 'install 'install-documentation
1113 (lambda* (#:key outputs #:allow-other-keys)
1114 (let* ((out (assoc-ref outputs "out"))
1115 (doc (string-append out "/share/doc/sslh")))
1116 (install-file "README.md" doc)
1117 (for-each
1118 (lambda (file)
1119 (install-file file (string-append doc "/examples")))
1120 (append (find-files "." "\\.cfg")
1121 (find-files "scripts"))))
1122 #t)))
1123 #:make-flags (list "CC=gcc"
1124 "USELIBCAP=1"
1125 "USELIBWRAP=1"
1126 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1127 #:test-target "test"))
1128 (home-page "https://www.rutschle.net/tech/sslh/README.html")
1129 (synopsis "Applicative network protocol demultiplexer")
1130 (description
1131 "sslh is a network protocol demultiplexer. It acts like a switchboard,
1132 accepting connections from clients on one port and forwarding them to different
1133 servers based on the contents of the first received data packet. Detection of
1134 common protocols like HTTP(S), SSL, SSH, OpenVPN, tinc, and XMPP is already
1135 implemented, but any other protocol that matches a regular expression can be
1136 added. sslh's name comes from its original application of serving both SSH and
1137 HTTPS on port 443, allowing SSH connections from inside corporate firewalls
1138 that block port 22.")
1139 (license (list license:bsd-2 ; tls.[ch]
1140 license:gpl2+)))) ; everything else
1141
1142 (define-public iperf
1143 (package
1144 (name "iperf")
1145 (version "3.1.7")
1146 (source (origin
1147 (method url-fetch)
1148 (uri (string-append "http://downloads.es.net/pub/iperf"
1149 "/iperf-" version ".tar.gz"))
1150 (sha256
1151 (base32
1152 "0kvk8d0a3dcxc8fisyprbn01y8akxj4sx8ld5dh508p9dx077vx4"))))
1153 (build-system gnu-build-system)
1154 (synopsis "TCP, UDP and SCTP bandwidth measurement tool")
1155 (description
1156 "iPerf is a tool to measure achievable bandwidth on IP networks. It
1157 supports tuning of various parameters related to timing, buffers and
1158 protocols (TCP, UDP, SCTP with IPv4 and IPv6). For each test it reports
1159 the bandwidth, loss, and other parameters.")
1160 (home-page "http://software.es.net/iperf/")
1161 (license (list license:bsd-3 ; Main distribution.
1162 license:ncsa ; src/{units,iperf_locale,tcp_window_size}.c
1163 license:expat ; src/{cjson,net}.[ch]
1164 license:public-domain)))) ; src/portable_endian.h
1165
1166 (define-public nethogs
1167 (package
1168 (name "nethogs")
1169 (version "0.8.5")
1170 (source (origin
1171 (method url-fetch)
1172 (uri (string-append "https://github.com/raboof/nethogs/archive/v"
1173 version ".tar.gz"))
1174 (sha256
1175 (base32
1176 "1k4x8r7s4dgcb6n2rjn28h2yyij92mwm69phncl3597cdxr954va"))
1177 (file-name (string-append name "-" version ".tar.gz"))))
1178 (build-system gnu-build-system)
1179 (inputs
1180 `(("libpcap" ,libpcap)
1181 ("ncurses" ,ncurses)))
1182 (arguments
1183 `(#:make-flags `("CC=gcc"
1184 ,(string-append "PREFIX=" %output))
1185 #:phases
1186 (modify-phases %standard-phases
1187 (delete 'configure)))) ; No ./configure script.
1188 (home-page "https://github.com/raboof/nethogs")
1189 (synopsis "Per-process bandwidth monitor")
1190 (description "NetHogs is a small 'net top' tool for Linux. Instead of
1191 breaking the traffic down per protocol or per subnet, like most tools do, it
1192 groups bandwidth by process.
1193
1194 NetHogs does not rely on a special kernel module to be loaded. If there's
1195 suddenly a lot of network traffic, you can fire up NetHogs and immediately see
1196 which PID is causing this. This makes it easy to identify programs that have
1197 gone wild and are suddenly taking up your bandwidth.")
1198 (license license:gpl2+)))
1199
1200 (define-public nzbget
1201 (package
1202 (name "nzbget")
1203 (version "19.1")
1204 (source
1205 (origin
1206 (method url-fetch)
1207 (uri (string-append "https://github.com/nzbget/nzbget/archive/v"
1208 version ".tar.gz"))
1209 (file-name (string-append name "-" version ".tar.gz"))
1210 (sha256
1211 (base32
1212 "0y713g7gd4n5chbhr8lv7k50rxkmzysrg13sscxam3s386mmlb1r"))
1213 (modules '((guix build utils)))
1214 (snippet
1215 ;; Reported upstream as <https://github.com/nzbget/nzbget/pull/414>.
1216 '(begin
1217 (substitute* "daemon/connect/TlsSocket.cpp"
1218 (("gnutls_certificate-verification_status_print")
1219 "gnutls_certificate_verification_status_print"))
1220 #t))))
1221 (arguments
1222 `(#:configure-flags
1223 (list
1224 (string-append "--with-libcurses-includes="
1225 (assoc-ref %build-inputs "ncurses") "/include")
1226 (string-append "--with-libcurses-libraries="
1227 (assoc-ref %build-inputs "ncurses") "/lib")
1228 (string-append "--with-tlslib=GnuTLS"))))
1229 (build-system gnu-build-system)
1230 (inputs `(("gnutls" ,gnutls)
1231 ("libxml2" ,libxml2)
1232 ("ncurses" ,ncurses)
1233 ("zlib" ,zlib)))
1234 (native-inputs `(("pkg-config" ,pkg-config)))
1235 (home-page "https://github.com/nzbget/nzbget")
1236 (synopsis "Usenet binary file downloader")
1237 (description
1238 "NZBGet is a binary newsgrabber, which downloads files from Usenet based
1239 on information given in @code{nzb} files. NZBGet can be used in standalone
1240 and in server/client modes. In standalone mode, you pass NZBGet @command{nzb}
1241 files as command-line parameters and it downloads them and exits. NZBGet also
1242 contains a Web interface. Its server can be controlled through remote
1243 procedure calls (RPCs).")
1244 (license license:gpl2+)))
1245
1246 (define-public openvswitch
1247 (package
1248 (name "openvswitch")
1249 (version "2.8.1")
1250 (source (origin
1251 (method url-fetch)
1252 (uri (string-append
1253 "http://openvswitch.org/releases/openvswitch-"
1254 version ".tar.gz"))
1255 (sha256
1256 (base32
1257 "14rqqhfyv49irz8ag0qbv9jn8z0bn3qzxir3r074y16p4sg4674d"))))
1258 (build-system gnu-build-system)
1259 (arguments
1260 '(;; FIXME: many tests fail with:
1261 ;; […]
1262 ;; test -e $OVS_RUNDIR/ovs-vswitchd.pid
1263 ;; ovs-appctl -t ovs-vswitchd exit
1264 ;; hard failure
1265 #:tests? #f
1266 #:configure-flags
1267 '("--enable-shared"
1268 "--localstatedir=/var"
1269 "--with-dbdir=/var/lib/openvswitch")
1270 #:phases
1271 (modify-phases %standard-phases
1272 (replace 'install
1273 (lambda _
1274 (zero? (system* "make"
1275 ;; Don't try to create directories under /var.
1276 "RUNDIR=/tmp"
1277 "PKIDIR=/tmp"
1278 "LOGDIR=/tmp"
1279 "DBDIR=/tmp"
1280 "install")))))))
1281 (native-inputs
1282 `(("perl" ,perl)
1283 ("pkg-config" ,pkg-config)
1284 ("python" ,python-2)
1285 ;; for testing
1286 ("util-linux" ,util-linux)))
1287 (propagated-inputs
1288 `(("python-six" ,python2-six)))
1289 (inputs
1290 `(("libcap-ng" ,libcap-ng)
1291 ("openssl" ,openssl)))
1292 (synopsis "Virtual network switch")
1293 (home-page "http://www.openvswitch.org/")
1294 (description
1295 "Open vSwitch is a multilayer virtual switch. It is designed to enable
1296 massive network automation through programmatic extension, while still
1297 supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
1298 IPFIX, RSPAN, CLI, LACP, 802.1ag).")
1299 (license ; see debian/copyright for detail
1300 (list license:lgpl2.1 ; xenserver and utilities/bugtool
1301 license:gpl2 ; datapath
1302 license:bsd-2 license:bsd-3
1303 license:asl2.0)))) ; all other
1304
1305 (define-public python-ipy
1306 (package
1307 (name "python-ipy")
1308 (version "0.83")
1309 (source (origin
1310 (method url-fetch)
1311 (uri (pypi-uri "IPy" version))
1312 (sha256
1313 (base32
1314 "1f6sdrxclifky4gvkf4gvyv5hx3fjh8vzspnfrqki6qm5d9mmnk1"))))
1315 (build-system python-build-system)
1316 (home-page "https://github.com/autocracy/python-ipy/")
1317 (synopsis "Python class and tools for handling IP addresses and networks")
1318 (description "The @code{IP} class allows a comfortable parsing and
1319 handling for most notations in use for IPv4 and IPv6 addresses and
1320 networks.")
1321 (license license:bsd-3)))
1322
1323 (define-public speedtest-cli
1324 (package
1325 (name "speedtest-cli")
1326 (version "1.0.7")
1327 (source
1328 (origin
1329 (method url-fetch)
1330 (uri (string-append
1331 "https://github.com/sivel/speedtest-cli/archive/v" version ".tar.gz"))
1332 (file-name (string-append name "-" version ".tar.gz"))
1333 (sha256
1334 (base32
1335 "1fbq4kpx8sj50g74hwpixisfjjgxq6zyn40d3m28dxhn7mxbnlrq"))))
1336 (build-system python-build-system)
1337 (home-page "https://github.com/sivel/speedtest-cli")
1338 (synopsis "Internet bandwidth tester")
1339 (description
1340 "Command line interface for testing internet bandwidth using
1341 speedtest.net.")
1342 (license license:asl2.0)))
1343
1344 (define-public tftp-hpa
1345 (package
1346 (name "tftp-hpa")
1347 (version "5.2")
1348 (source (origin
1349 (method url-fetch)
1350 (uri (string-append "mirror://kernel.org/software/"
1351 "network/tftp/tftp-hpa/tftp-hpa-" version
1352 ".tar.xz"))
1353 (sha256
1354 (base32
1355 "12vidchglhyc20znq5wdsbhi9mqg90jnl7qr9qs8hbvaz4fkdvmg"))))
1356 (build-system gnu-build-system)
1357 (arguments `(#:tests? #f)) ; no test target
1358 (synopsis "HPA's tftp client")
1359 (description
1360 "This is a tftp client derived from OpenBSD tftp with some extra options
1361 added and bugs fixed. The source includes readline support but it is not
1362 enabled due to license conflicts between the BSD advertising clause and the GPL.")
1363 (home-page "http://git.kernel.org/cgit/network/tftp/tftp-hpa.git/about/")
1364 ;; Some source files are distributed under a 3-clause BSD license, and
1365 ;; others under a 4-clause BSD license. Refer to the files in the source
1366 ;; distribution for clarification.
1367 (license (list license:bsd-3 license:bsd-4))))
1368
1369 (define-public pidentd
1370 (package
1371 (name "pidentd")
1372 (version "3.0.19")
1373 (source
1374 (origin
1375 (method url-fetch)
1376 (uri (string-append "https://github.com/ptrrkssn/pidentd/archive/"
1377 "v" version ".tar.gz"))
1378 (file-name (string-append name "-" version ".tar.gz"))
1379 (sha256
1380 (base32
1381 "0y3kd1bkydqkpc1qdff24yswysamsqivvadjy0468qri5730izgc"))))
1382 (build-system gnu-build-system)
1383 (arguments
1384 `(#:tests? #f)) ; No tests are included
1385 (inputs
1386 `(("openssl" ,openssl))) ; For the DES library
1387 (home-page "https://www.lysator.liu.se/~pen/pidentd/")
1388 (synopsis "Small Ident Daemon")
1389 (description
1390 "@dfn{Pidentd} (Peter's Ident Daemon) is a identd, which implements a
1391 identification server. Pidentd looks up specific TCP/IP connections and
1392 returns the user name and other information about the connection.")
1393 (license license:public-domain)))
1394
1395 (define-public spiped
1396 (package
1397 (name "spiped")
1398 (version "1.6.0")
1399 (source (origin
1400 (method url-fetch)
1401 (uri (string-append "https://www.tarsnap.com/spiped/spiped-"
1402 version ".tgz"))
1403 (sha256
1404 (base32
1405 "1r51rdcl7nib1yv3yvgd5alwlkkwmr387brqavaklb0p2bwzixz6"))))
1406 (build-system gnu-build-system)
1407 (arguments
1408 '(#:test-target "test"
1409 #:make-flags (let* ((out (assoc-ref %outputs "out"))
1410 (bindir (string-append out "/bin"))
1411 (man1dir (string-append out "/share/man/man1")))
1412 (list "CC=gcc" ; It tries to invoke `c99`.
1413 (string-append "BINDIR=" bindir)
1414 (string-append "MAN1DIR=" man1dir)))
1415 #:phases
1416 (modify-phases %standard-phases
1417 (add-after 'unpack 'patch-command-invocations
1418 (lambda _
1419 (substitute* '("Makefile"
1420 "libcperciva/cpusupport/Build/cpusupport.sh"
1421 "libcperciva/POSIX/posix-cflags.sh"
1422 "libcperciva/POSIX/posix-l.sh")
1423 (("command -p") ""))
1424 #t))
1425 (delete 'configure) ; No ./configure script.
1426 (add-after 'install 'install-more-docs
1427 (lambda* (#:key outputs #:allow-other-keys)
1428 (let* ((out (assoc-ref %outputs "out"))
1429 (misc (string-append out "/share/doc/spiped")))
1430 (install-file "DESIGN.md" misc)
1431 #t))))))
1432 (native-inputs
1433 `(("procps" ,procps))) ; `ps` is used by the test suite.
1434 (inputs
1435 `(("openssl" ,openssl)))
1436 (home-page "https://www.tarsnap.com/spiped.html")
1437 (synopsis "Create secure pipes between sockets")
1438 (description "Spiped (pronounced \"ess-pipe-dee\") is a utility for creating
1439 symmetrically encrypted and authenticated pipes between socket addresses, so
1440 that one may connect to one address (e.g., a UNIX socket on localhost) and
1441 transparently have a connection established to another address (e.g., a UNIX
1442 socket on a different system). This is similar to 'ssh -L' functionality, but
1443 does not use SSH and requires a pre-shared symmetric key.")
1444 (license license:bsd-2)))
1445
1446 (define-public quagga
1447 (package
1448 (name "quagga")
1449 (version "1.2.4")
1450 (source (origin
1451 (method url-fetch)
1452 (uri (string-append "mirror://savannah/quagga/quagga-"
1453 version ".tar.gz"))
1454 (sha256
1455 (base32
1456 "1lsksqxij5f1llqn86pkygrf5672kvrqn1kvxghi169hqf1c0r73"))
1457 (patches
1458 (search-patches "quagga-reproducible-build.patch"))))
1459 (build-system gnu-build-system)
1460 (native-inputs `(("pkg-config" ,pkg-config)
1461 ("perl" ,perl)
1462 ("dejagnu" ,dejagnu)))
1463 (inputs `(("readline" ,readline)
1464 ("c-ares" ,c-ares)))
1465 (synopsis "Routing Software Suite")
1466 (description "Quagga is a routing software suite, providing implementations
1467 of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for Unix platforms.
1468
1469 The Quagga architecture consists of a core daemon, @command{zebra}, which
1470 acts as an abstraction layer to the underlying Unix kernel and presents the
1471 Zserv API over a Unix or TCP stream to Quagga clients. It is these Zserv
1472 clients which typically implement a routing protocol and communicate routing
1473 updates to the zebra daemon.")
1474 (home-page "https://www.nongnu.org/quagga/")
1475 (license license:gpl2+)))
1476
1477 (define-public thc-ipv6
1478 (let ((revision "0")
1479 (commit "4bb72573e0950ce6f8ca2800a10748477020029e"))
1480 (package
1481 (name "thc-ipv6")
1482 (version (git-version "3.4" revision commit))
1483 (source (origin
1484 (method git-fetch)
1485 (uri (git-reference
1486 (url "https://github.com/vanhauser-thc/thc-ipv6.git")
1487 (commit commit)))
1488 (file-name (git-file-name name version))
1489 (sha256
1490 (base32
1491 "1x5i6vbsddqc2yks7r1a2fw2fk16qxvd6hpzh1lykjfpkal8fdir"))))
1492 (build-system gnu-build-system)
1493 (arguments
1494 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1495 #:tests? #f ; No test suite.
1496 #:phases
1497 (modify-phases %standard-phases
1498 (delete 'configure) ; No ./configure script.
1499 (add-before 'build 'patch-paths
1500 (lambda _
1501 (substitute* "Makefile"
1502 (("/bin/echo") "echo"))
1503 #t))
1504 (add-after 'install 'install-more-docs
1505 (lambda* (#:key outputs #:allow-other-keys)
1506 (let* ((out (assoc-ref outputs "out"))
1507 (doc (string-append out "/share/thc-ipv6/doc")))
1508 (install-file "README" doc)
1509 (install-file "HOWTO-INJECT" doc)
1510 #t))))))
1511 ;; TODO Add libnetfilter-queue once packaged.
1512 (inputs
1513 `(("libpcap" ,libpcap)
1514 ("openssl" ,openssl)
1515 ("perl" ,perl)))
1516 (home-page "https://github.com/vanhauser-thc/thc-ipv6")
1517 (synopsis "IPv6 security research toolkit")
1518 (description "The THC IPv6 Toolkit provides command-line tools and a library
1519 for researching IPv6 implementations and deployments. It requires Linux 2.6 or
1520 newer and only works on Ethernet network interfaces.")
1521 ;; AGPL 3 with exception for linking with OpenSSL. See the 'LICENSE' file in
1522 ;; the source distribution for more information.
1523 (license license:agpl3))))
1524
1525 (define-public bmon
1526 (package
1527 (name "bmon")
1528 (version "4.0")
1529 (source
1530 (origin
1531 (method url-fetch)
1532 (uri (string-append "https://github.com/tgraf/bmon/releases/download/v"
1533 version "/bmon-" version ".tar.gz"))
1534 (sha256
1535 (base32
1536 "0ylzriv4pwh76344abzl1w219x188gshbycbna35gsyfp09c7z82"))))
1537 (build-system gnu-build-system)
1538 (inputs
1539 `(("libconfuse" ,libconfuse)
1540 ("libnl" ,libnl)
1541 ("ncurses" ,ncurses)))
1542 (native-inputs
1543 `(("pkg-config" ,pkg-config)))
1544 (synopsis "Bandwidth monitor")
1545 (description "bmon is a monitoring and debugging tool to capture
1546 networking-related statistics and prepare them visually in a human-friendly
1547 way. It features various output methods including an interactive curses user
1548 interface and a programmable text output for scripting.")
1549 (home-page "https://github.com/tgraf/bmon")
1550 ;; README.md mentions both the 2-clause BSD and expat licenses, but all
1551 ;; the source files only have expat license headers. Upstream has been
1552 ;; contacted for clarification: https://github.com/tgraf/bmon/issues/59
1553 ;; Update the license field when upstream responds.
1554 (license (list license:bsd-2
1555 license:expat))))
1556
1557 (define-public libnet
1558 (package
1559 (name "libnet")
1560 (version "1.1.6")
1561 (source (origin
1562 (method url-fetch)
1563 (uri (string-append "https://github.com/sam-github/libnet/"
1564 "archive/libnet-" version ".tar.gz"))
1565 (file-name (string-append name "-" version ".tar.gz"))
1566 (sha256
1567 (base32
1568 "0l4gbzzvr199fzczzricjz7b825i7dlk6sgl5p5alnkcagmq0xys"))))
1569 (build-system gnu-build-system)
1570 (arguments
1571 `(#:phases
1572 (modify-phases %standard-phases
1573 (add-after 'unpack 'chdir
1574 (lambda _ (chdir "libnet") #t))
1575 (add-before 'build 'build-doc
1576 (lambda* (#:key make-flags #:allow-other-keys)
1577 (zero? (apply system* "make" "-C" "doc" "doc"
1578 make-flags)))))))
1579 (native-inputs
1580 `(("autoconf" ,autoconf)
1581 ("automake" ,automake)
1582 ("libtool" ,libtool)
1583 ("doxygen" ,doxygen)))
1584 (home-page "https://sourceforge.net/projects/libnet-dev/")
1585 (synopsis "Framework for low-level network packet construction")
1586 (description
1587 "Libnet provides a fairly portable framework for network packet
1588 construction and injection. It features portable packet creation interfaces
1589 at the IP layer and link layer, as well as a host of supplementary
1590 functionality. Using libnet, quick and simple packet assembly applications
1591 can be whipped up with little effort.")
1592 (license license:bsd-2)))
1593
1594 (define-public mtr
1595 (package
1596 (name "mtr")
1597 (version "0.92")
1598 (source
1599 (origin
1600 (method url-fetch)
1601 (uri (string-append "ftp://ftp.bitwizard.nl/" name "/"
1602 name "-" version ".tar.gz"))
1603 (sha256
1604 (base32 "10j3ds3p27jygys4x08kj8fi3zlsgiv72xsfazkah6plwawrv5zj"))))
1605 (build-system gnu-build-system)
1606 (inputs
1607 `(("libcap" ,libcap)
1608 ("ncurses" ,ncurses)))
1609 (native-inputs
1610 ;; The 0.92 release tarball still requires the ‘autoheader’ tool.
1611 `(("autoconf" ,autoconf)))
1612 (arguments
1613 `(#:tests? #f)) ; tests require network access
1614 (home-page "https://www.bitwizard.nl/mtr/")
1615 (synopsis "Network diagnostic tool")
1616 (description
1617 "@dfn{mtr} (My TraceRoute) combines the functionality of the
1618 @command{traceroute} and @command{ping} programs in a single network diagnostic
1619 tool. @command{mtr} can use several network protocols to detect intermediate
1620 routers (or @dfn{hops}) between the local host and a user-specified destination.
1621 It then continually measures the response time and packet loss at each hop, and
1622 displays the results in real time.")
1623 (license license:gpl2+)))
1624
1625 (define-public strongswan
1626 (package
1627 (name "strongswan")
1628 (version "5.6.2")
1629 (source
1630 (origin
1631 (method url-fetch)
1632 (uri (string-append "https://download.strongswan.org/strongswan-"
1633 version ".tar.bz2"))
1634 (sha256
1635 (base32 "14ifqay54brw2b2hbmm517bxw8bs9631d7jm4g139igkxcq0m9p0"))))
1636 (build-system gnu-build-system)
1637 (arguments
1638 `(#:phases
1639 (modify-phases %standard-phases
1640 (add-before 'build 'patch-command-file-names
1641 (lambda* (#:key inputs #:allow-other-keys)
1642 (substitute* "src/libstrongswan/utils/process.c"
1643 (("/bin/sh")
1644 (string-append (assoc-ref inputs "bash") "/bin/sh")))
1645
1646 (substitute* "src/libstrongswan/tests/suites/test_process.c"
1647 (("/bin/sh") (which "sh"))
1648 (("/bin/echo") (which "echo"))
1649 (("cat") (which "cat")))
1650 #t))
1651 (add-before 'check 'set-up-test-environment
1652 (lambda* (#:key inputs #:allow-other-keys)
1653 (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
1654 "/share/zoneinfo"))
1655 #t)))
1656 #:configure-flags
1657 (list
1658 ;; Disable bsd-4 licensed plugins
1659 "--disable-des"
1660 "--disable-blowfish")))
1661 (inputs
1662 `(("curl" ,curl)
1663 ("gmp" ,gmp)
1664 ("libgcrypt" ,libgcrypt)
1665 ("openssl" ,openssl)))
1666 (native-inputs
1667 `(("coreutils" ,coreutils)
1668 ("tzdata" ,tzdata-for-tests)))
1669 (synopsis "IKEv1/v2 keying daemon")
1670 (description "StrongSwan is an IPsec implementation originally based upon
1671 the FreeS/WAN project. It contains support for IKEv1, IKEv2, MOBIKE, IPv6,
1672 NAT-T and more.")
1673 (home-page "https://strongswan.org/")
1674 (license
1675 (list license:gpl2+
1676 ;; src/aikgen/*
1677 ;; src/libcharon/plugins/dnscert/*
1678 ;; src/libcharon/plugins/ext_auth/*
1679 ;; src/libcharon/plugins/vici/ruby/*
1680 ;; src/libcharon/plugins/xauth_pam/xauth_pam_listener.[ch]
1681 license:expat
1682 ;; src/inclue/sys/*
1683 license:bsd-3
1684 ;; src/libstrongswan/plugins/sha3/sha3_keccak.c
1685 license:public-domain
1686 ;; src/libstrongswan/plugins/pkcs11/pkcs11.h
1687 (license:non-copyleft
1688 "file://src/libstrongswan/plugins/pkcs11/pkcs11.h"
1689 "pkcs11 contains a unknown permissive license. View the specific
1690 file for more details.")
1691 ;; These files are not included in the
1692 ;; build, they are disabled through
1693 ;; options to ./configure
1694 ;;
1695 ;; src/libstrongswan/plugins/blowfish/bf_enc.c
1696 ;; src/libstrongswan/plugins/blowfish/bf_locl.h
1697 ;; src/libstrongswan/plugins/blowfish/bf_pi.h
1698 ;; src/libstrongswan/plugins/blowfish/bf_skey.c
1699 ;; src/libstrongswan/plugins/blowfish/blowfish_crypter.c
1700 ;; src/libstrongswan/plugins/des/des_crypter.c
1701 license:bsd-4))))