gnu: rust-crossbeam-queue-0.1: Don't skip build.
[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, 2020 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, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
9 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
10 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
11 ;;; Copyright © 2016, 2017 Nikita <nikita@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, 2020 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
19 ;;; Copyright © 2017, 2019 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, 2020 Marius Bakke <mbakke@fastmail.com>
27 ;;; Copyright © 2018, 2020 Oleg Pykhalov <go.wigust@gmail.com>
28 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
29 ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
30 ;;; Copyright © 2019 Vasile Dumitrascu <va511e@yahoo.com>
31 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
32 ;;; Copyright © 2019 Timotej Lazar <timotej.lazar@araneo.si>
33 ;;; Copyright © 2019 Brice Waegeneire <brice@waegenei.re>
34 ;;; Copyright © 2019 Tonton <tonton@riseup.net>
35 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
36 ;;; Copyright © 2019, 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
37 ;;; Copyright © 2019 Daniel Schaefer <git@danielschaefer.me>
38 ;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
39 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
40 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
41 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
42 ;;;
43 ;;; This file is part of GNU Guix.
44 ;;;
45 ;;; GNU Guix is free software; you can redistribute it and/or modify it
46 ;;; under the terms of the GNU General Public License as published by
47 ;;; the Free Software Foundation; either version 3 of the License, or (at
48 ;;; your option) any later version.
49 ;;;
50 ;;; GNU Guix is distributed in the hope that it will be useful, but
51 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
52 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53 ;;; GNU General Public License for more details.
54 ;;;
55 ;;; You should have received a copy of the GNU General Public License
56 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
57
58 (define-module (gnu packages networking)
59 #:use-module ((guix licenses) #:prefix license:)
60 #:use-module (guix packages)
61 #:use-module (guix download)
62 #:use-module (guix git-download)
63 #:use-module (guix build-system cmake)
64 #:use-module (guix build-system glib-or-gtk)
65 #:use-module (guix build-system gnu)
66 #:use-module (guix build-system go)
67 #:use-module (guix build-system meson)
68 #:use-module (guix build-system perl)
69 #:use-module (guix build-system python)
70 #:use-module (guix build-system trivial)
71 #:use-module (guix utils)
72 #:use-module (gnu packages)
73 #:use-module (gnu packages admin)
74 #:use-module (gnu packages adns)
75 #:use-module (gnu packages algebra)
76 #:use-module (gnu packages audio)
77 #:use-module (gnu packages autogen)
78 #:use-module (gnu packages autotools)
79 #:use-module (gnu packages base)
80 #:use-module (gnu packages bison)
81 #:use-module (gnu packages boost)
82 #:use-module (gnu packages check)
83 #:use-module (gnu packages code)
84 #:use-module (gnu packages compression)
85 #:use-module (gnu packages cpp)
86 #:use-module (gnu packages crypto)
87 #:use-module (gnu packages curl)
88 #:use-module (gnu packages cyrus-sasl)
89 #:use-module (gnu packages dejagnu)
90 #:use-module (gnu packages docbook)
91 #:use-module (gnu packages documentation)
92 #:use-module (gnu packages flex)
93 #:use-module (gnu packages freedesktop)
94 #:use-module (gnu packages gettext)
95 #:use-module (gnu packages glib)
96 #:use-module (gnu packages gnome)
97 #:use-module (gnu packages gnupg)
98 #:use-module (gnu packages gtk)
99 #:use-module (gnu packages image)
100 #:use-module (gnu packages libevent)
101 #:use-module (gnu packages libidn)
102 #:use-module (gnu packages linux)
103 #:use-module (gnu packages lua)
104 #:use-module (gnu packages multiprecision)
105 #:use-module (gnu packages kerberos)
106 #:use-module (gnu packages ncurses)
107 #:use-module (gnu packages nettle)
108 #:use-module (gnu packages openldap)
109 #:use-module (gnu packages password-utils)
110 #:use-module (gnu packages pcre)
111 #:use-module (gnu packages perl)
112 #:use-module (gnu packages perl-check)
113 #:use-module (gnu packages pkg-config)
114 #:use-module (gnu packages polkit)
115 #:use-module (gnu packages pretty-print)
116 #:use-module (gnu packages pulseaudio)
117 #:use-module (gnu packages python)
118 #:use-module (gnu packages python-web)
119 #:use-module (gnu packages python-xyz)
120 #:use-module (gnu packages qt)
121 #:use-module (gnu packages readline)
122 #:use-module (gnu packages samba)
123 #:use-module (gnu packages serialization)
124 #:use-module (gnu packages sqlite)
125 #:use-module (gnu packages ssh)
126 #:use-module (gnu packages textutils)
127 #:use-module (gnu packages tls)
128 #:use-module (gnu packages valgrind)
129 #:use-module (gnu packages web)
130 #:use-module (gnu packages wxwidgets)
131 #:use-module (gnu packages xml)
132 #:use-module (ice-9 match))
133
134 (define-public blueman
135 (package
136 (name "blueman")
137 (version "2.1.3")
138 (source
139 (origin
140 (method url-fetch)
141 (uri (string-append "https://github.com/blueman-project/blueman/releases"
142 "/download/" version "/blueman-" version ".tar.xz"))
143 (sha256
144 (base32 "1pngqbwapbvywhkmflapqvs0wa0af7d1a87wy56l5hg2r462xl1v"))))
145 (build-system glib-or-gtk-build-system)
146 (arguments
147 `(#:configure-flags (list "--enable-polkit"
148 "--without-systemdsystemunitdir" ; Not required
149 "--without-systemduserunitdir") ; Not required
150 #:phases
151 (modify-phases %standard-phases
152 ;; Python references are not being patched in patch-phase of build,
153 ;; despite using python-wrapper as input. So we patch them manually.
154 (add-after 'unpack 'patch-python-references
155 (lambda* (#:key inputs #:allow-other-keys)
156 (with-directory-excursion "apps"
157 (substitute* '("blueman-adapters.in" "blueman-applet.in"
158 "blueman-assistant.in" "blueman-manager.in"
159 "blueman-mechanism.in" "blueman-report.in"
160 "blueman-rfcomm-watcher.in" "blueman-sendto.in"
161 "blueman-services.in" "blueman-tray.in")
162 (("@PYTHON@") (string-append (assoc-ref inputs "python")
163 "/bin/python"
164 ,(version-major+minor
165 (package-version python))))))
166 #t))
167 ;; Fix loading of external programs.
168 (add-after 'unpack 'patch-external-programs
169 (lambda* (#:key inputs #:allow-other-keys)
170 (substitute* '("apps/blueman-report.in" "blueman/main/NetConf.py"
171 "blueman/main/PPPConnection.py")
172 (("/usr/sbin/bluetoothd")
173 (string-append (assoc-ref inputs "bluez")
174 "/libexec/bluetooth/bluetoothd"))
175 (("/sbin/iptables")
176 (string-append (assoc-ref inputs "iptables")
177 "/sbin/iptables"))
178 (("/usr/sbin/pppd")
179 (string-append (assoc-ref inputs "ppp")
180 "/sbin/pppd")))
181 #t))
182 ;; Fix loading of pulseaudio libraries.
183 (add-after 'unpack 'patch-pulseaudio-libraries
184 (lambda* (#:key inputs #:allow-other-keys)
185 (let* ((pulseaudio (assoc-ref inputs "pulseaudio"))
186 (pulse (string-append pulseaudio "/lib/libpulse.so.0"))
187 (pulse-glib (string-append pulseaudio
188 "/lib/libpulse-mainloop-glib.so.0")))
189 (with-directory-excursion "blueman/main"
190 (substitute* "PulseAudioUtils.py"
191 (("libpulse.so.0") pulse)
192 (("libpulse-mainloop-glib.so.0") pulse-glib)))
193 #t)))
194 ;; Fix running of blueman programs.
195 (add-after 'glib-or-gtk-wrap 'wrap-blueman-progs
196 (lambda* (#:key outputs #:allow-other-keys)
197 (let* ((out (assoc-ref outputs "out"))
198 (bin (string-append out "/bin/blueman-"))
199 (libexec (string-append out "/libexec/blueman-"))
200 (lib (string-append out "/lib/python"
201 ,(version-major+minor
202 (package-version python))
203 "/site-packages")))
204 (for-each
205 (lambda (program)
206 (wrap-program program
207 `("PYTHONPATH" = (,(getenv "PYTHONPATH") ,lib))
208 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))
209 (append
210 (map (lambda (prog) (string-append bin prog))
211 '("adapters" "applet" "assistant" "manager" "report"
212 "sendto" "services" "tray"))
213 (map (lambda (prog) (string-append libexec prog))
214 '("mechanism" "rfcomm-watcher"))))
215 #t))))))
216 (native-inputs
217 `(("cython" ,python-cython)
218 ("glib:bin" ,glib "bin")
219 ("gobject-introspection" ,gobject-introspection)
220 ("gtk+:bin" ,gtk+ "bin")
221 ("intltool" ,intltool)
222 ("pkg-config" ,pkg-config)))
223 (inputs
224 `(("bluez" ,bluez)
225 ("dbus" ,dbus)
226 ("gdkpixbuf" ,gdk-pixbuf+svg)
227 ("glib" ,glib)
228 ("gtk+" ,gtk+)
229 ("iproute2" ,iproute)
230 ("iptables" ,iptables)
231 ("net-tools" ,net-tools)
232 ("pango" ,pango)
233 ("polkit" ,polkit)
234 ("ppp" ,ppp)
235 ("pulseaudio" ,pulseaudio)
236 ("pycairo" ,python-pycairo)
237 ("pygobject" ,python-pygobject)
238 ("python" ,python-wrapper)
239 ("libappindicator" ,libappindicator)
240 ("libnm" ,network-manager)))
241 (synopsis "GTK+ Bluetooth manager")
242 (description "Blueman is a Bluetooth management utility using the Bluez
243 D-Bus backend. It is designed to be easy to use for most common Bluetooth
244 tasks.")
245 (home-page "https://github.com/blueman-project/blueman")
246 (license license:gpl3+)))
247
248 ;; The gnu.org ‘home’ for this GNU project is a directory listing with 1.6.0 as
249 ;; the latest version. The author's git repository, mentioned in the 1.6.0
250 ;; README and otherwise legit-looking, contains a proper 1.7.0 release tarball
251 ;; with many OUI updates. Use it, even though it's also several years old now.
252 (define-public macchanger
253 (package
254 (name "macchanger")
255 (version "1.7.0")
256 (source
257 (origin
258 (method url-fetch)
259 (uri (string-append "https://github.com/alobbs/macchanger/"
260 "releases/download/" version "/"
261 name "-" version ".tar.gz"))
262 (sha256
263 (base32 "1gs5m0jxyprdp00w2qkbnaqm3ilkjz0q1gqdg4nzdm8g4xy73qns"))))
264 (build-system gnu-build-system)
265 (home-page "https://www.gnu.org/software/macchanger/")
266 (synopsis "Viewing and manipulating MAC addresses of network interfaces")
267 (description "GNU MAC Changer is a utility for viewing and changing MAC
268 addresses of networking devices. New addresses may be set explicitly or
269 randomly. They can include MAC addresses of the same or other hardware vendors
270 or, more generally, MAC addresses of the same category of hardware.")
271 (license license:gpl2+)))
272
273 (define-public miredo
274 (package
275 (name "miredo")
276 (version "1.2.6")
277 (source (origin
278 (method url-fetch)
279 (uri (string-append "http://www.remlab.net/files/miredo/miredo-"
280 version ".tar.xz"))
281 (sha256
282 (base32
283 "0j9ilig570snbmj48230hf7ms8kvcwi2wblycqrmhh85lksd49ps"))))
284 (build-system gnu-build-system)
285 (arguments
286 '(#:phases
287 (modify-phases %standard-phases
288 ;; The checkconf test in src/ requires network access.
289 (add-before
290 'check 'disable-checkconf-test
291 (lambda _
292 (substitute* "src/Makefile"
293 (("^TESTS = .*") "TESTS = \n"))
294 #t)))))
295 (home-page "https://www.remlab.net/miredo/")
296 (synopsis "Teredo IPv6 tunneling software")
297 (description
298 "Miredo is an implementation (client, relay, server) of the Teredo
299 specification, which provides IPv6 Internet connectivity to IPv6 enabled hosts
300 residing in IPv4-only networks, even when they are behind a NAT device.")
301 (license license:gpl2+)))
302
303 (define-public ndisc6
304 (package
305 (name "ndisc6")
306 (version "1.0.4")
307 (source (origin
308 (method url-fetch)
309 (uri (string-append "https://www.remlab.net/files/ndisc6/ndisc6-"
310 version ".tar.bz2"))
311 (sha256
312 (base32
313 "07swyar1hl83zxmd7fqwb2q0c0slvrswkcfp3nz5lknrk15dmcdb"))))
314 (build-system gnu-build-system)
315 (home-page "https://www.remlab.net/ndisc6/")
316 (synopsis "IPv6 diagnostic tools")
317 (description
318 "NDisc6 is a collection of tools for IPv6 networking diagnostics.
319 It includes the following programs:
320
321 @itemize
322 @item @command{ndisc6}: ICMPv6 Neighbor Discovery tool.
323 @item @command{rdisc6}: ICMPv6 Router Discovery tool.
324 @item @command{tcptraceroute6}: IPv6 traceroute over TCP.
325 @item @command{traceroute6}: IPv6 traceroute over UDP.
326 @item @command{rdnssd}: Recursive DNS Servers discovery daemon.
327 @end itemize")
328 ;; The user can choose version 2 or 3 of the GPL, not later versions.
329 (license (list license:gpl2 license:gpl3))))
330
331 (define-public socat
332 (package
333 (name "socat")
334 (version "1.7.3.4")
335 (source (origin
336 (method url-fetch)
337 (uri (string-append
338 "http://www.dest-unreach.org/socat/download/socat-"
339 version ".tar.bz2"))
340 (sha256
341 (base32
342 "1z7xgnwiqpcv1j6aghhj9nqbx7cg3gpc4n9j7vi9hm7nhv5788wp"))))
343 (build-system gnu-build-system)
344 (arguments '(#:tests? #f)) ; no test suite
345 (inputs `(("openssl" ,openssl)))
346 (home-page "http://www.dest-unreach.org/socat/")
347 (synopsis
348 "Open bidirectional communication channels from the command line")
349 (description
350 "socat is a relay for bidirectional data transfer between two independent
351 data channels---files, pipes, devices, sockets, etc. It can create
352 \"listening\" sockets, named pipes, and pseudo terminals.
353
354 socat can be used, for instance, as TCP port forwarder, as a shell interface
355 to UNIX sockets, IPv6 relay, for redirecting TCP oriented programs to a serial
356 line, to logically connect serial lines on different computers, or to
357 establish a relatively secure environment (su and chroot) for running client
358 or server shell scripts with network connections.")
359 (license license:gpl2)))
360
361 (define-public tcp-wrappers
362 (package
363 (name "tcp-wrappers")
364 (version "7.6")
365 (source (origin
366 (method url-fetch)
367 (uri (string-append
368 "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_"
369 version ".tar.gz"))
370 (sha256
371 (base32
372 "0p9ilj4v96q32klavx0phw9va21fjp8vpk11nbh6v2ppxnnxfhwm"))))
373 (build-system gnu-build-system)
374 (arguments
375 `(#:phases
376 (modify-phases %standard-phases
377 (delete 'configure) ; there is no configure script
378 (delete 'check) ; there are no tests
379 (replace 'build
380 (lambda _
381 (chmod "." #o755)
382 ;; Upstream doesn't generate a shared library. So we have to do it.
383 (setenv "CC" "gcc -fno-builtin -fPIC")
384 (substitute* "Makefile"
385 (("^(all[^\n]*)" line) (string-append line " libwrap.so\n
386 libwrap.so: $(LIB_OBJ)\n
387 \tgcc -shared $^ -o $@\n")))
388 ;; Deal with some gcc breakage.
389 (substitute* "percent_m.c"
390 (("extern char .sys_errlist.*;") ""))
391 (substitute* "scaffold.c"
392 (("extern char .malloc.*;") ""))
393 ;; This, believe it or not, is the recommended way to build!
394 (invoke "make" "REAL_DAEMON_DIR=/etc" "linux")))
395 ;; There is no make install stage, so we have to do it ourselves.
396 (replace 'install
397 (lambda _
398 (let ((out (assoc-ref %outputs "out"))
399 (man-pages `("hosts_access.3"
400 "hosts_access.5"
401 "hosts_options.5"
402 "tcpd.8"
403 "tcpdchk.8"
404 "tcpdmatch.8"))
405 (libs `("libwrap.a"
406 "libwrap.so"))
407 (headers `("tcpd.h"))
408 (bins `("safe_finger"
409 "tcpd"
410 "tcpdchk"
411 "tcpdmatch"
412 "try-from")))
413 (for-each
414 (lambda (x)
415 (install-file x (string-append out "/include")))
416 headers)
417 (for-each
418 (lambda (x)
419 (install-file x (string-append out "/share/man/man"
420 (string-take-right x 1))))
421 man-pages)
422 (for-each
423 (lambda (x)
424 (install-file x (string-append out "/lib/")))
425 libs)
426 (for-each
427 (lambda (x)
428 (install-file x (string-append out "/bin/")))
429 bins))
430 #t)))))
431 (home-page "http://www.porcupine.org")
432 (synopsis "Monitor and filter incoming requests for network services")
433 (description "With this package you can monitor and filter incoming requests for
434 network services. It includes a library which may be used by daemons to
435 transparently check connection attempts against an access control list.")
436 (license (license:non-copyleft "file://DISCLAIMER"
437 "See the file DISCLAIMER in the distribution."))))
438
439
440 (define-public zeromq
441 (package
442 (name "zeromq")
443 (version "4.3.2")
444 (source (origin
445 (method url-fetch)
446 (uri (string-append "https://github.com/zeromq/libzmq/releases"
447 "/download/v" version "/zeromq-" version ".tar.gz"))
448 (sha256
449 (base32
450 "0qzp80ky4y2k7k1ya09v9gkivvfbz2km813snrb8jhnn634bbmzb"))))
451 (build-system gnu-build-system)
452 (home-page "https://zeromq.org")
453 (synopsis "Library for message-based applications")
454 (description
455 "The 0MQ lightweight messaging kernel is a library which extends the
456 standard socket interfaces with features traditionally provided by specialized
457 messaging middle-ware products. 0MQ sockets provide an abstraction of
458 asynchronous message queues, multiple messaging patterns, message
459 filtering (subscriptions), seamless access to multiple transport protocols and
460 more.")
461 (license license:lgpl3+)))
462
463 (define-public czmq
464 (package
465 (name "czmq")
466 (version "4.2.0")
467 (source (origin
468 (method url-fetch)
469 (uri (string-append
470 "https://github.com/zeromq/" name
471 "/releases/download/v" version
472 "/" name "-" version ".tar.gz"))
473 (sha256
474 (base32
475 "1szciz62sk3fm4ga9qjpxz0n0lazvphm32km95bq92ncng12kayg"))))
476 (build-system gnu-build-system)
477 (arguments
478 '(#:configure-flags '("--enable-drafts")
479 #:phases (modify-phases %standard-phases
480 (add-before 'check 'patch-tests
481 (lambda _
482 ;; XXX FIXME: Disable the zproc test, which fails on some
483 ;; hardware: <https://github.com/zeromq/czmq/issues/2007>.
484 (substitute* "src/czmq_selftest.c"
485 (("\\{ \"zproc\", zproc_test.*")
486 ""))
487 #t)))))
488 (inputs
489 `(("zeromq" ,zeromq)))
490 (home-page "https://zeromq.org")
491 (synopsis "High-level C bindings for ØMQ")
492 (description
493 "czmq provides bindings for the ØMQ core API that hides the differences
494 between different versions of ØMQ.")
495 (license license:mpl2.0)))
496
497 (define-public cppzmq
498 (package
499 (name "cppzmq")
500 (version "4.6.0")
501 (source (origin
502 (method git-fetch)
503 (uri (git-reference
504 (url "https://github.com/zeromq/cppzmq")
505 (commit (string-append "v" version))))
506 (sha256
507 (base32
508 "19acx2bzi4n6fdnfgkja1nds7m1bwg8lw5vfcijrx9fv75pa7m8h"))
509 (file-name (git-file-name name version))))
510 (build-system cmake-build-system)
511 (arguments
512 '(;; FIXME: The test suite requires downloading Catch and custom
513 ;; CMake targets, and refuses to use the system version.
514 ;; See <https://github.com/zeromq/cppzmq/issues/334>.
515 #:tests? #f
516 #:configure-flags '("-DCPPZMQ_BUILD_TESTS=OFF")))
517 (native-inputs
518 `(("pkg-config" ,pkg-config)))
519 (inputs
520 `(("zeromq" ,zeromq)))
521 (home-page "https://zeromq.org")
522 (synopsis "C++ bindings for the ØMQ messaging library")
523 (description
524 "This package provides header-only C++ bindings for ØMQ. The header
525 files contain direct mappings of the abstractions provided by the ØMQ C API.")
526 (license license:expat)))
527
528 (define-public libnatpmp
529 (package
530 (name "libnatpmp")
531 (version "20150609")
532 (source (origin
533 (method url-fetch)
534 (uri (string-append
535 "http://miniupnp.free.fr/files/"
536 name "-" version ".tar.gz"))
537 (sha256
538 (base32
539 "1c1n8n7mp0amsd6vkz32n8zj3vnsckv308bb7na0dg0r8969rap1"))))
540 (build-system gnu-build-system)
541 (arguments
542 `(#:phases
543 (modify-phases %standard-phases
544 (delete 'configure)
545 (delete 'check)) ; no tests
546 #:make-flags
547 (let* ((target ,(%current-target-system))
548 (gcc (if target
549 (string-append target "-gcc")
550 "gcc")))
551 (list
552 (string-append "CC=" gcc)
553 (string-append "INSTALLPREFIX=" (assoc-ref %outputs "out"))
554 (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")))))
555 (home-page "http://miniupnp.free.fr/libnatpmp.html")
556 (synopsis "C library implementing NAT-PMP")
557 (description
558 "@code{libnatpmp} is a portable and asynchronous implementation of
559 the Network Address Translation - Port Mapping Protocol (NAT-PMP)
560 written in the C programming language.")
561 (license license:bsd-3)))
562
563 (define-public librdkafka
564 (package
565 (name "librdkafka")
566 (version "1.4.2")
567 (source (origin
568 (method git-fetch)
569 (uri (git-reference
570 (url "https://github.com/edenhill/librdkafka.git")
571 (commit (string-append "v" version))))
572 (file-name (git-file-name name version))
573 (sha256
574 (base32
575 "05mgrdzacn9kdpr68r5j0cvsvl54s52glnsc1ww9rcxx6p7hq1ly"))))
576 (build-system gnu-build-system)
577 (arguments
578 '(#:phases
579 (modify-phases %standard-phases
580 (replace 'configure
581 ;; its custom configure script doesn't understand 'CONFIG_SHELL'.
582 (lambda* (#:key outputs #:allow-other-keys)
583 (let ((out (assoc-ref outputs "out")))
584 ;; librdkafka++.so lacks RUNPATH for librdkafka.so
585 (setenv "LDFLAGS"
586 (string-append "-Wl,-rpath=" out "/lib"))
587 (invoke "./configure"
588 (string-append "--prefix=" out))))))))
589 (native-inputs
590 `(("python" ,python-wrapper)))
591 (propagated-inputs
592 `(("zlib" ,zlib))) ; in the Libs.private field of rdkafka.pc
593 (home-page "https://github.com/edenhill/librdkafka")
594 (synopsis "Apache Kafka C/C++ client library")
595 (description
596 "librdkafka is a C library implementation of the Apache Kafka protocol,
597 containing both Producer and Consumer support.")
598 (license license:bsd-2)))
599
600 (define-public libndp
601 (package
602 (name "libndp")
603 (version "1.7")
604 (source (origin
605 (method url-fetch)
606 (uri (string-append "https://libndp.org/files/"
607 "libndp-" version ".tar.gz"))
608 (sha256
609 (base32
610 "1dlinhl39va00v55qygjc9ap77yqf7xvn4rwmvdr49xhzzxhlj1c"))))
611 (build-system gnu-build-system)
612 (home-page "https://libndp.org/")
613 (synopsis "Library for Neighbor Discovery Protocol")
614 (description
615 "libndp contains a library which provides a wrapper for IPv6 Neighbor
616 Discovery Protocol. It also provides a tool named ndptool for sending and
617 receiving NDP messages.")
618 (license license:lgpl2.1+)))
619
620 (define-public ethtool
621 (package
622 (name "ethtool")
623 (version "5.7")
624 (source (origin
625 (method url-fetch)
626 (uri (string-append "mirror://kernel.org/software/network/"
627 "ethtool/ethtool-" version ".tar.xz"))
628 (sha256
629 (base32
630 "0f9w0pqkvwn540rasmj6c8897g9gj2hmjnbkhpi9yf1s7jyvhkkj"))))
631 (build-system gnu-build-system)
632 (native-inputs
633 `(("pkg-config" ,pkg-config)))
634 (inputs
635 `(("libmnl" ,libmnl)))
636 (home-page "https://www.kernel.org/pub/software/network/ethtool/")
637 (synopsis "Display or change Ethernet device settings")
638 (description
639 "ethtool can be used to query and change settings such as speed,
640 auto-negotiation and checksum offload on many network devices, especially
641 Ethernet devices.")
642 (license license:gpl2)))
643
644 (define-public ifstatus
645 (package
646 (name "ifstatus")
647 (version "1.1.0")
648 (source (origin
649 (method url-fetch)
650 (uri (string-append "mirror://sourceforge/ifstatus/ifstatus/"
651 "ifstatus%20v" version "/ifstatus-v"
652 version ".tar.gz"))
653 (sha256
654 (base32
655 "045cbsq9ps32j24v8y5hpyqxnqn9mpaf3mgvirlhgpqyb9jsia0c"))
656 (modules '((guix build utils)))
657 (snippet
658 '(begin
659 (substitute* "Main.h"
660 (("#include <stdio.h>")
661 "#include <stdio.h>\n#include <stdlib.h>"))
662 #t))))
663 (build-system gnu-build-system)
664 (arguments
665 '(#:tests? #f ; no "check" target
666 #:phases
667 (modify-phases %standard-phases
668 (delete 'configure) ; no configure script
669 (replace 'install
670 (lambda* (#:key outputs #:allow-other-keys)
671 (let* ((out (assoc-ref outputs "out"))
672 (bin (string-append out "/bin")))
673 (mkdir-p bin)
674 (copy-file "ifstatus"
675 (string-append bin "/ifstatus")))
676 #t)))))
677 (inputs `(("ncurses" ,ncurses)))
678 (home-page "http://ifstatus.sourceforge.net/graphic/index.html")
679 (synopsis "Text based network interface status monitor")
680 (description
681 "IFStatus is a simple, easy-to-use program for displaying commonly
682 needed/wanted real-time traffic statistics of multiple network
683 interfaces, with a simple and efficient view on the command line. It is
684 intended as a substitute for the PPPStatus and EthStatus projects.")
685 (license license:gpl2+)))
686
687 (define-public iputils
688 (package
689 (name "iputils")
690 (version "20190709")
691 (home-page "https://github.com/iputils/iputils")
692 (source (origin
693 (method git-fetch)
694 (uri (git-reference (url home-page)
695 (commit (string-append "s" version))))
696 (file-name (git-file-name name version))
697 (patches (search-patches "iputils-libcap-compat.patch"))
698 (sha256
699 (base32
700 "04bp4af15adp79ipxmiakfp0ij6hx5qam266flzbr94pr8z8l693"))))
701 (build-system meson-build-system)
702 (arguments
703 `(#:configure-flags '("-DBUILD_RARPD=true")
704 #:phases
705 (modify-phases %standard-phases
706 (add-after 'unpack 'fix-docbook-url
707 (lambda* (#:key inputs #:allow-other-keys)
708 (let* ((docbook-xsl (assoc-ref inputs "docbook-xsl"))
709 (uri (string-append docbook-xsl "/xml/xsl/docbook-xsl-"
710 ,(package-version docbook-xsl))))
711 (for-each
712 (lambda (file)
713 (substitute* file
714 (("http://docbook\\.sourceforge\\.net/release/xsl-ns/current")
715 uri)))
716 (cons "doc/meson.build"
717 (find-files "doc" "\\.xsl$")))
718 #t))))))
719 (native-inputs
720 `(("gettext" ,gettext-minimal)
721 ("pkg-config" ,pkg-config)
722 ("docbook-xsl" ,docbook-xsl)
723 ("docbook-xml" ,docbook-xml-5)
724 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
725 ("xsltproc" ,libxslt)))
726 (inputs
727 `(("libcap" ,libcap)
728 ("libidn2" ,libidn2)
729 ("openssl" ,openssl)))
730 (synopsis "Collection of network utilities")
731 (description
732 "This package contains a variety of tools for dealing with network
733 configuration, troubleshooting, or servers. Utilities included are:
734
735 @itemize @bullet
736 @item @command{arping}: Ping hosts using the @dfn{Adress Resolution Protocol}.
737 @item @command{clockdiff}: Compute time difference between network hosts
738 using ICMP TSTAMP messages.
739 @item @command{ninfod}: Daemon that responds to IPv6 Node Information Queries.
740 @item @command{ping}: Use ICMP ECHO messages to measure round-trip delays
741 and packet loss across network paths.
742 @item @command{rarpd}: Answer RARP requests from clients.
743 @item @command{rdisc}: Populate network routing tables with information from
744 the ICMP router discovery protocol.
745 @item @command{tftpd}: Trivial file transfer protocol server.
746 @item @command{tracepath}: Trace network path to an IPv4 or IPv6 address and
747 discover MTU along the way.
748 @end itemize")
749 ;; The various utilities are covered by different licenses, see LICENSE
750 ;; for details.
751 (license (list license:gpl2+ ;arping, rarpd, tracepath
752 license:bsd-3 ;clockdiff, ninfod, ping, tftpd
753 (license:non-copyleft
754 "https://spdx.org/licenses/Rdisc.html"
755 "Sun Microsystems license, see rdisc.c for details")))))
756
757 (define-public nload
758 (package
759 (name "nload")
760 (version "0.7.4")
761 (source (origin
762 (method url-fetch)
763 (uri (string-append "mirror://sourceforge/nload/nload/" version
764 "/nload-" version ".tar.gz"))
765 (sha256
766 (base32
767 "1rb9skch2kgqzigf19x8bzk211jdfjfdkrcvaqyj89jy2pkm3h61"))))
768 (build-system gnu-build-system)
769 (inputs `(("ncurses" ,ncurses)))
770 (home-page "http://www.roland-riegel.de/nload/")
771 (synopsis "Realtime console network usage monitor")
772 (description
773 "Nload is a console application which monitors network traffic and
774 bandwidth usage in real time. It visualizes the in- and outgoing traffic using
775 two graphs, and provides additional info like total amount of transferred data
776 and min/max network usage.")
777 (license license:gpl2+)))
778
779 (define-public iodine
780 (package
781 (name "iodine")
782 (version "0.7.0")
783 (source (origin
784 (method url-fetch)
785 (uri (string-append "http://code.kryo.se/" name "/"
786 name "-" version ".tar.gz"))
787 (sha256
788 (base32
789 "0gh17kcxxi37k65zm4gqsvbk3aw7yphcs3c02pn1c4s2y6n40axd"))))
790 (build-system gnu-build-system)
791 (arguments
792 '(#:phases
793 (modify-phases %standard-phases
794 (delete 'configure)
795 (add-before 'build 'fix-ifconfig-path
796 ;; This package works only with the net-tools version of ifconfig.
797 (lambda* (#:key inputs #:allow-other-keys)
798 (substitute* "src/tun.c"
799 (("PATH=[^ ]* ")
800 (string-append (assoc-ref inputs "net-tools") "/bin/")))
801 #t))
802 (add-before 'check 'delete-failing-tests
803 ;; Avoid https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802105.
804 (lambda _
805 (substitute* "tests/common.c"
806 (("tcase_add_test\\(tc, \
807 test_parse_format_ipv(4(|_listen_all|_mapped_ipv6)|6)\\);")
808 ""))
809 #t)))
810 #:make-flags (list "CC=gcc"
811 (string-append "prefix=" (assoc-ref %outputs "out")))
812 #:test-target "test"))
813 (inputs `(("net-tools" ,net-tools)
814 ("zlib" ,zlib)))
815 (native-inputs `(("check" ,check)
816 ("pkg-config" ,pkg-config)))
817 (home-page "https://code.kryo.se/iodine/")
818 (synopsis "Tunnel IPv4 data through a DNS server")
819 (description "Iodine tunnels IPv4 data through a DNS server. This
820 can be useful in different situations where internet access is firewalled, but
821 DNS queries are allowed. The bandwidth is asymmetrical, with limited upstream
822 and up to 1 Mbit/s downstream.")
823 ;; src/md5.[ch] is released under the zlib license
824 (license (list license:isc license:zlib))))
825
826 (define-public whois
827 (package
828 (name "whois")
829 (version "5.5.6")
830 (source
831 (origin
832 (method url-fetch)
833 (uri (string-append "mirror://debian/pool/main/w/whois/"
834 "whois_" version ".tar.xz"))
835 (sha256
836 (base32 "0kpi981zjczvdcxfcq455c529vlaxa73x8kbm530z5b01h0fk8fb"))))
837 (build-system gnu-build-system)
838 (arguments
839 `(#:tests? #f ; no test suite
840 #:make-flags (list "CC=gcc"
841 (string-append "prefix=" (assoc-ref %outputs "out")))
842 #:phases
843 (modify-phases %standard-phases
844 (delete 'configure) ; no configure script
845 (add-before 'build 'setenv
846 (lambda _
847 (setenv "HAVE_ICONV" "1")
848 #t)))))
849 (inputs
850 `(("libidn2" ,libidn2)))
851 (native-inputs
852 `(("gettext" ,gettext-minimal)
853 ("perl" ,perl)
854 ("pkg-config" ,pkg-config)))
855 (synopsis "Intelligent client for the WHOIS directory service")
856 (description
857 "whois searches for an object in a @dfn{WHOIS} (RFC 3912) database.
858 It is commonly used to look up the registered users or assignees of an Internet
859 resource, such as a domain name, an IP address block, or an autonomous system.
860 It can automatically select the appropriate server for most queries.
861
862 For historical reasons, this package also includes @command{mkpasswd}, which
863 encrypts passwords using @code{crypt(3)} and is unrelated to the Expect command
864 of the same name.")
865 (home-page "https://github.com/rfc1036/whois")
866 (license license:gpl2+)))
867
868 (define-public wireshark
869 (package
870 (name "wireshark")
871 (version "3.2.4")
872 (source
873 (origin
874 (method url-fetch)
875 (uri (string-append "https://www.wireshark.org/download/src/wireshark-"
876 version ".tar.xz"))
877 (sha256
878 (base32 "1amqgn94g6h6cfnsccm2zb4c73pfv1qmzi1i6h1hnbcyhhg4czfi"))))
879 (build-system cmake-build-system)
880 (arguments
881 `(#:phases
882 (modify-phases %standard-phases
883 (add-after 'unpack 'remove-failing-test
884 ;; Test 31/32 fails with errors like "Program reassemble_test is
885 ;; not available". Skipping it for now.
886 (lambda _
887 (substitute* "CMakeLists.txt"
888 (("suite_unittests" all) (string-append "# " all)))
889 #t)))
890 ;; Build process chokes during `validate-runpath' phase.
891 ;;
892 ;; Errors are like the following:
893 ;; "/gnu/store/...wireshark-3.0.0/lib/wireshark/plugins/3.0/epan/ethercat.so:
894 ;; error: depends on 'libwireshark.so.12', which cannot be found in
895 ;; RUNPATH". That is, "/gnu/store/...wireshark-3.0.0./lib" doesn't
896 ;; belong to RUNPATH.
897 ;;
898 ;; That’s not a problem in practice because "ethercat.so" is a plugin,
899 ;; so it’s dlopen’d by a process that already provides "libwireshark".
900 ;; For now, we disable this phase.
901 #:validate-runpath? #f))
902 (inputs
903 `(("c-ares" ,c-ares)
904 ("glib" ,glib)
905 ("gnutls" ,gnutls)
906 ("libcap" ,libcap)
907 ("libgcrypt" ,libgcrypt)
908 ("libnl" ,libnl)
909 ("libpcap" ,libpcap)
910 ("libssh" ,libssh)
911 ("libxml2" ,libxml2)
912 ("lz4" ,lz4)
913 ("lua" ,lua-5.2) ;Lua 5.3 unsupported
914 ("krb5" ,mit-krb5)
915 ("qtbase" ,qtbase)
916 ("qtmultimedia" ,qtmultimedia)
917 ("qtsvg" ,qtsvg)
918 ("sbc" ,sbc)
919 ("snappy" ,snappy)
920 ("zlib" ,zlib)))
921 (native-inputs
922 `(("bison" ,bison)
923 ("doxygen" ,doxygen)
924 ("flex" ,flex)
925 ("gettext" ,gettext-minimal)
926 ("perl" ,perl)
927 ("pkg-config" ,pkg-config)
928 ("python" ,python-wrapper)
929 ("qttools" ,qttools)))
930 (synopsis "Network traffic analyzer")
931 (description "Wireshark is a network protocol analyzer, or @dfn{packet
932 sniffer}, that lets you capture and interactively browse the contents of
933 network frames.")
934 (home-page "https://www.wireshark.org/")
935 (license license:gpl2+)))
936
937 (define-public fping
938 (package
939 (name "fping")
940 (version "4.2")
941 (source
942 (origin
943 (method url-fetch)
944 (uri (string-append "https://fping.org/dist/fping-"
945 version ".tar.gz"))
946 (sha256
947 (base32 "0jmnf4vmr43aiwk3h2b5qdsb95gxar8gz1yli8fswnm9nrs9ccvx"))))
948 (build-system gnu-build-system)
949 (home-page "https://fping.org/")
950 (synopsis "Send ICMP ECHO_REQUEST packets to network hosts")
951 (description
952 "fping is a ping like program which uses the Internet Control Message
953 Protocol (ICMP) echo request to determine if a target host is responding.
954 fping differs from ping in that you can specify any number of targets on the
955 command line, or specify a file containing the lists of targets to ping.
956 Instead of sending to one target until it times out or replies, fping will
957 send out a ping packet and move on to the next target in a round-robin
958 fashion.")
959 (license license:expat)))
960
961 (define-public gandi.cli
962 (package
963 (name "gandi.cli")
964 (version "1.5")
965 (source
966 (origin
967 (method url-fetch)
968 (uri (pypi-uri name version))
969 (sha256
970 (base32 "110wc9zgxsrvw4yzp21p0ian5lcf7vhcpxhnmsc4fg9pzl2bwxd5"))))
971 (build-system python-build-system)
972 (arguments
973 `(#:phases
974 (modify-phases %standard-phases
975 (add-after 'unpack 'embed-store-file-names
976 (lambda _
977 (substitute* (list "gandi/cli/modules/cert.py"
978 "gandi/cli/tests/commands/test_certificate.py")
979 (("openssl") (which "openssl")))
980 #t))
981 (add-after 'install 'install-documentation
982 ;; The included man page may be outdated but we install it anyway,
983 ;; since it's mentioned in 'gandi --help' and better than nothing.
984 (lambda* (#:key outputs #:allow-other-keys)
985 (let* ((out (assoc-ref outputs "out"))
986 (man1 (string-append out "/share/man/man1")))
987 (mkdir-p man1)
988 (with-output-to-file (string-append man1 "/gandi.1")
989 (lambda _
990 (invoke "rst2man.py" "gandicli.man.rst")))
991 #t))))))
992 (native-inputs
993 `(("python-docutils" ,python-docutils) ; for rst2man.py
994 ("python-pytest-cov" ,python-pytest-cov)
995 ("python-tox" ,python-tox)))
996 (inputs
997 `(("openssl" ,openssl)
998 ("python-click" ,python-click)
999 ("python-ipy" ,python-ipy)
1000 ("python-pyyaml" ,python-pyyaml)
1001 ("python-requests" ,python-requests)))
1002 (home-page "https://cli.gandi.net")
1003 (synopsis "Command-line interface to the Gandi.net Web API")
1004 (description
1005 "This package provides a command-line client (@command{gandi}) to buy,
1006 manage, and delete Internet resources from Gandi.net such as domain names,
1007 virtual machines, and certificates.")
1008 (license license:gpl3+)))
1009
1010 (define-public go-netns
1011 (let ((commit "13995c7128ccc8e51e9a6bd2b551020a27180abd")
1012 (revision "1"))
1013 (package
1014 (name "go-netns")
1015 (version (git-version "0.0.0" revision commit))
1016 (source (origin
1017 (method git-fetch)
1018 (uri (git-reference
1019 (url "https://github.com/vishvananda/netns.git")
1020 (commit commit)))
1021 (file-name (git-file-name name version))
1022 (sha256
1023 (base32
1024 "1zk6w8158qi4niva5rijchbv9ixgmijsgqshh54wdaav4xrhjshn"))))
1025 (build-system go-build-system)
1026 (arguments
1027 `(#:import-path "github.com/vishvananda/netns"
1028 #:tests? #f)) ;tests require root privileges
1029 (home-page "https://github.com/vishvananda/netns")
1030 (synopsis "Simple network namespace handling for Go")
1031 (description "The netns package provides a simple interface for
1032 handling network namespaces in Go.")
1033 (license license:asl2.0))))
1034
1035 (define-public go-sctp
1036 ;; docker-libnetwork-cmd-proxy requires this exact commit.
1037 (let ((commit "07191f837fedd2f13d1ec7b5f885f0f3ec54b1cb")
1038 (revision "1"))
1039 (package
1040 (name "go-sctp")
1041 (version (git-version "0.0.0" revision commit))
1042 (source (origin
1043 (method git-fetch)
1044 (uri (git-reference
1045 (url "https://github.com/ishidawataru/sctp.git")
1046 (commit commit)))
1047 (file-name (git-file-name name version))
1048 (sha256
1049 (base32
1050 "1mk9ncm10gwi5pn5wcw4skbyf4qg7n5qdf1mim4gf3mrckvi6g6h"))))
1051 (build-system go-build-system)
1052 (arguments
1053 `(#:import-path "github.com/ishidawataru/sctp"))
1054 (home-page "https://github.com/ishidawataru/sctp")
1055 (synopsis "SCTP library for the Go programming language")
1056 (description "This library provides methods for using the stream control
1057 transmission protocol (SCTP) in a Go application.")
1058 (license license:asl2.0))))
1059
1060 (define-public httping
1061 (package
1062 (name "httping")
1063 (version "2.5")
1064 (source
1065 (origin
1066 (method url-fetch)
1067 (uri (string-append "https://www.vanheusden.com/httping/httping-"
1068 version ".tgz"))
1069 (sha256
1070 (base32
1071 "1y7sbgkhgadmd93x1zafqc4yp26ssiv16ni5bbi9vmvvdl55m29y"))))
1072 (build-system gnu-build-system)
1073 (native-inputs
1074 `(("gettext" ,gettext-minimal)))
1075 (inputs
1076 `(("fftw" ,fftw)
1077 ("ncurses" ,ncurses)
1078 ("openssl" ,openssl)))
1079 (arguments
1080 `(#:make-flags (list "CC=gcc"
1081 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
1082 "PREFIX=")
1083 #:tests? #f)) ; no tests
1084 (home-page "https://www.vanheusden.com/httping/")
1085 (synopsis "Web server latency and throughput monitor")
1086 (description
1087 "httping measures how long it takes to connect to a web server, send an
1088 HTTP(S) request, and receive the reply headers. It is somewhat similar to
1089 @command{ping}, but can be used even in cases where ICMP traffic is blocked
1090 by firewalls or when you want to monitor the response time of the actual web
1091 application stack itself.")
1092 (license license:gpl2))) ; with permission to link with OpenSSL
1093
1094 (define-public httpstat
1095 (package
1096 (name "httpstat")
1097 (version "1.2.1")
1098 (source
1099 (origin
1100 (method url-fetch)
1101 (uri (pypi-uri "httpstat" version))
1102 (sha256
1103 (base32
1104 "1chw2nk56vaq87aba012a270k9na06hfx1pfbsrc3jfvlc2kb9hb"))))
1105 (build-system python-build-system)
1106 (inputs `(("curl" ,curl)))
1107 (arguments
1108 '(#:phases
1109 (modify-phases %standard-phases
1110 (add-before 'build 'fix-curl-path
1111 (lambda* (#:key inputs #:allow-other-keys)
1112 (substitute* "httpstat.py"
1113 (("ENV_CURL_BIN.get\\('curl'\\)")
1114 (string-append "ENV_CURL_BIN.get('"
1115 (assoc-ref inputs "curl")
1116 "/bin/curl')")))
1117 #t)))))
1118 (home-page "https://github.com/reorx/httpstat")
1119 (synopsis "Visualize curl statistics")
1120 (description
1121 "@command{httpstat} is a tool to visualize statistics from the
1122 @command{curl} HTTP client. It acts as a wrapper for @command{curl} and
1123 prints timing information for each step of the HTTP request (DNS lookup,
1124 TCP connection, TLS handshake and so on) in the terminal.")
1125 (license license:expat)))
1126
1127 (define-public squid
1128 (package
1129 (name "squid")
1130 (version "4.12")
1131 (source
1132 (origin
1133 (method url-fetch)
1134 (uri (string-append "http://www.squid-cache.org/Versions/v4/squid-"
1135 version ".tar.xz"))
1136 (sha256
1137 (base32 "05z34ysy2zn7as11vd365xxhh36bm1ysiwcbr0i0f0nwng406apl"))))
1138 (build-system gnu-build-system)
1139 (arguments
1140 '(#:phases
1141 (modify-phases %standard-phases
1142 (add-before 'build 'fix-true-path
1143 (lambda* (#:key inputs #:allow-other-keys)
1144 (substitute* "test-suite/testheaders.sh"
1145 (("/bin/true")
1146 (string-append (assoc-ref inputs "coreutils")
1147 "/bin/true")))
1148 #t)))))
1149 (inputs
1150 `(("perl" ,perl)
1151 ("openldap" ,openldap)
1152 ("linux-pam" ,linux-pam)
1153 ("libcap" ,libcap)
1154 ("cyrus-sasl" ,cyrus-sasl)
1155 ("expat" ,expat)
1156 ("libxml2" ,libxml2)
1157 ("openssl" ,openssl)))
1158 (native-inputs
1159 `(("cppunit" ,cppunit)
1160 ("pkg-config" ,pkg-config)))
1161 (synopsis "Web caching proxy")
1162 (description "Squid is a caching proxy for the Web supporting HTTP, HTTPS,
1163 FTP, and more. It reduces bandwidth and improves response times by caching and
1164 reusing frequently-requested web pages.")
1165 (home-page "http://www.squid-cache.org/")
1166 (license license:gpl2+)))
1167
1168 (define-public bwm-ng
1169 (package
1170 (name "bwm-ng")
1171 (version "0.6.2")
1172 (source
1173 (origin
1174 (method git-fetch)
1175 (uri (git-reference
1176 (url "https://github.com/vgropp/bwm-ng.git")
1177 (commit (string-append "v" version))))
1178 (file-name (git-file-name name version))
1179 (sha256
1180 (base32 "0k906wb4pw3dcqpcwnni78lahzi3bva483f8c17sjykic7as4y5n"))))
1181 (build-system gnu-build-system)
1182 (arguments
1183 `(#:phases
1184 (modify-phases %standard-phases
1185 (add-after 'unpack 'disable-premature-./configure
1186 (lambda _
1187 (substitute* "autogen.sh"
1188 (("\\$srcdir/configure")
1189 "true"))
1190 #t)))))
1191 (native-inputs
1192 `(("autoconf" ,autoconf)
1193 ("automake" ,automake)))
1194 (inputs
1195 `(("ncurses" ,ncurses)))
1196 (synopsis "Console based live network and disk I/O bandwidth monitor")
1197 (description "Bandwidth Monitor NG is a small and simple console based
1198 live network and disk I/O bandwidth monitor.")
1199 (home-page "https://www.gropp.org/?id=projects&sub=bwm-ng")
1200 (license license:gpl2)))
1201
1202 (define-public aircrack-ng
1203 (package
1204 (name "aircrack-ng")
1205 (version "1.6")
1206 (source
1207 (origin
1208 (method url-fetch)
1209 (uri (string-append "https://download.aircrack-ng.org/aircrack-ng-"
1210 version ".tar.gz"))
1211 (sha256
1212 (base32 "0ix2k64qg7x3w0bzdsbk1m50kcpq1ws59g3zkwiafvpwdr4gs2sg"))))
1213 (build-system gnu-build-system)
1214 (native-inputs
1215 `(("autoconf" ,autoconf)
1216 ("automake" ,automake)
1217 ("libtool" ,libtool)
1218 ("pkg-config" ,pkg-config)
1219 ("which" ,which)))
1220 (inputs
1221 `(("libgcrypt" ,libgcrypt)
1222 ("libnl" ,libnl)
1223 ("libpcap" ,libpcap)
1224 ("ethtool" ,ethtool)
1225 ("pcre" ,pcre)
1226 ("sqlite" ,sqlite)
1227 ("zlib" ,zlib)))
1228 (arguments
1229 `(#:configure-flags
1230 (list "--with-experimental=yes" ; build wesside-ng, etc.
1231 "--with-gcrypt") ; openssl's the default
1232 #:phases (modify-phases %standard-phases
1233 (add-before 'bootstrap 'patch-evalrev
1234 (lambda _
1235 ;; Called by ./autogen.sh below, before the default
1236 ;; ‘patch-shebangs’ phase has had a chance to run.
1237 (substitute* "evalrev"
1238 (("/bin/sh")
1239 (which "sh")))
1240 #t))
1241 (add-after 'build 'absolutize-tools
1242 (lambda* (#:key inputs #:allow-other-keys)
1243 (let ((ethtool (string-append (assoc-ref inputs "ethtool")
1244 "/sbin/ethtool")))
1245 (substitute* "scripts/airmon-ng"
1246 (("ethtool ")
1247 (string-append ethtool " ")))
1248 #t))))))
1249 (home-page "https://www.aircrack-ng.org")
1250 (synopsis "Assess WiFi network security")
1251 (description
1252 "Aircrack-ng is a complete suite of tools to assess WiFi network
1253 security. It focuses on different areas of WiFi security: monitoring,
1254 attacking, testing, and cracking. All tools are command-line driven, which
1255 allows for heavy scripting.")
1256 (license (list license:gpl2+ license:bsd-3))))
1257
1258 (define-public pixiewps
1259 (package
1260 (name "pixiewps")
1261 (version "1.4.2")
1262 (source (origin
1263 (method url-fetch)
1264 (uri (string-append
1265 "https://github.com/wiire-a/pixiewps/releases/"
1266 "download/v" version "/" name "-" version ".tar.xz"))
1267 (sha256
1268 (base32
1269 "07nym6bqml0k9v29vnj003nrgnwrywgjvnljb7cdpsvnwilhbp64"))))
1270 (build-system gnu-build-system)
1271 (arguments
1272 '(#:make-flags
1273 (list "CC=gcc"
1274 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1275 #:phases
1276 (modify-phases %standard-phases
1277 (delete 'configure)) ; no configure script
1278 #:tests? #f)) ; there are no tests
1279 (home-page "https://github.com/wiire-a/pixiewps/")
1280 (synopsis "Offline brute-force tool for Wi-Fi Protected Setup")
1281 (description "Pixiewps implements the pixie-dust attack to brute
1282 force the Wi-Fi Protected Setup (WPS) PIN by exploiting the low or
1283 non-existing entropy of some access points.")
1284 (license license:gpl3+)))
1285
1286 (define-public reaver
1287 (package
1288 (name "reaver")
1289 (version "1.6.6")
1290 (source (origin
1291 (method url-fetch)
1292 (uri (string-append
1293 "https://github.com/t6x/reaver-wps-fork-t6x/releases/"
1294 "download/v" version "/reaver-" version ".tar.xz"))
1295 (sha256
1296 (base32
1297 "00k7mc81ifv0wma7k4v18mj498badbw5yls6c28qin3d1gda0ag3"))))
1298 (build-system gnu-build-system)
1299 (arguments
1300 `(#:configure-flags
1301 ;; Save session files to current directory instead of /var.
1302 (list "--enable-savetocurrent"
1303 "--localstatedir=/tmp/dummy") ; prevent creating /var during install
1304 #:phases
1305 (modify-phases %standard-phases
1306 (add-before 'configure 'change-directory
1307 (lambda _
1308 (chdir "src")
1309 #t))
1310 (add-after 'install 'install-doc
1311 (lambda* (#:key outputs #:allow-other-keys)
1312 (chdir "../docs")
1313 (let* ((out (assoc-ref outputs "out"))
1314 (doc (string-append out "/share/doc/" ,name "-" ,version))
1315 (man1 (string-append out "/share/man/man1")))
1316 (for-each (lambda (file) (install-file file doc))
1317 (find-files "." "README.*"))
1318 (install-file "reaver.1" man1)
1319 #t))))
1320 #:tests? #f)) ; there are no tests
1321 (inputs
1322 `(("libpcap" ,libpcap)))
1323 (propagated-inputs
1324 `(("aircrack-ng" ,aircrack-ng)
1325 ("pixiewps" ,pixiewps)))
1326 (home-page "https://github.com/t6x/reaver-wps-fork-t6x/")
1327 (synopsis "Attack tool for Wi-Fi Protected Setup")
1328 (description "Reaver performs a brute force attack against an access
1329 point's Wi-Fi Protected Setup (WPS) PIN. Once the PIN is found, the WPA
1330 passphrase can be recovered and the AP's wireless settings can be
1331 reconfigured.")
1332 (license license:gpl2+)))
1333
1334 (define-public perl-danga-socket
1335 (package
1336 (name "perl-danga-socket")
1337 (version "1.62")
1338 (source
1339 (origin
1340 (method url-fetch)
1341 (uri (string-append "mirror://cpan/authors/id/N/NM/NML/"
1342 "Danga-Socket-" version ".tar.gz"))
1343 (sha256
1344 (base32 "0x4bvirmf0kphks19jwgva00zz73zx344218dfaiv8gigrw3yg4m"))))
1345 (build-system perl-build-system)
1346 (native-inputs
1347 `(("perl-test-tcp" ,perl-test-tcp)))
1348 (propagated-inputs
1349 `(("perl-sys-syscall" ,perl-sys-syscall)))
1350 (home-page "https://metacpan.org/release/Danga-Socket")
1351 (synopsis "Event loop and event-driven async socket base class")
1352 (description
1353 "Danga::Socket is an abstract base class for objects backed by a socket
1354 which provides the basic framework for event-driven asynchronous IO, designed
1355 to be fast. Danga::Socket is both a base class for objects, and an event
1356 loop.")
1357 (license license:perl-license)))
1358
1359 (define-public perl-data-validate-ip
1360 (package
1361 (name "perl-data-validate-ip")
1362 (version "0.27")
1363 (source
1364 (origin
1365 (method url-fetch)
1366 (uri (string-append
1367 "mirror://cpan/authors/id/D/DR/DROLSKY/Data-Validate-IP-"
1368 version ".tar.gz"))
1369 (sha256
1370 (base32 "1mmppyzsh1w2z2h86kvzqxy56wxgs62a3kf8nvcnz76bblir5ap1"))))
1371 (build-system perl-build-system)
1372 (native-inputs
1373 `(("perl-test-requires" ,perl-test-requires)))
1374 (propagated-inputs
1375 `(("perl-netaddr-ip" ,perl-netaddr-ip)))
1376 (home-page "https://metacpan.org/release/Data-Validate-IP")
1377 (synopsis "IPv4 and IPv6 validation methods")
1378 (description
1379 "This module provides several IP address validation subroutines that both
1380 validate and untaint their input. This includes both basic validation
1381 (@code{is_ipv4()} and @code{is_ipv6()}) and special cases like checking whether
1382 an address belongs to a specific network or whether an address is public or
1383 private (reserved).")
1384 (license license:perl-license)))
1385
1386 (define-public perl-net-dns
1387 (package
1388 (name "perl-net-dns")
1389 (version "1.24")
1390 (source
1391 (origin
1392 (method url-fetch)
1393 (uri
1394 (list
1395 (string-append "https://www.net-dns.org/download/Net-DNS-"
1396 version ".tar.gz")
1397 (string-append "mirror://cpan/authors/id/N/NL/NLNETLABS/Net-DNS-"
1398 version ".tar.gz")))
1399 (sha256
1400 (base32 "0qyy5k4k0llqjjmkkfg96919gqybdc1z5fy9047n9imidjxc59hi"))))
1401 (build-system perl-build-system)
1402 (inputs
1403 `(("perl-digest-hmac" ,perl-digest-hmac)))
1404 (home-page "https://www.net-dns.org/")
1405 (synopsis
1406 "Perl Interface to the Domain Name System")
1407 (description "Net::DNS is the Perl Interface to the Domain Name System.")
1408 (license license:x11)))
1409
1410 (define-public perl-socket6
1411 (package
1412 (name "perl-socket6")
1413 (version "0.29")
1414 (source
1415 (origin
1416 (method url-fetch)
1417 (uri (string-append
1418 "mirror://cpan/authors/id/U/UM/UMEMOTO/Socket6-"
1419 version
1420 ".tar.gz"))
1421 (sha256
1422 (base32
1423 "054izici8klfxs8hr5rljib28plijpsfymy99xbzdp047bx1b2a6"))))
1424 (build-system perl-build-system)
1425 (arguments
1426 `(#:phases
1427 (modify-phases %standard-phases
1428 (replace 'configure
1429 (lambda* (#:key outputs #:allow-other-keys)
1430 (let* ((out (assoc-ref outputs "out"))
1431 (args `("Makefile.PL"
1432 ,(string-append "PREFIX=" out)
1433 "INSTALLDIRS=site")))
1434 (setenv "CONFIG_SHELL" (which "sh"))
1435 (apply invoke "perl" args)))))))
1436 (home-page "https://metacpan.org/release/Socket6")
1437 (synopsis
1438 "IPv6 related part of the C socket.h defines and structure manipulators for Perl")
1439 (description "Socket6 binds the IPv6 related part of the C socket header
1440 definitions and structure manipulators for Perl.")
1441 (license license:bsd-3)))
1442
1443 (define-public perl-net-dns-resolver-programmable
1444 (package
1445 (name "perl-net-dns-resolver-programmable")
1446 (version "0.003")
1447 (source
1448 (origin
1449 (method url-fetch)
1450 (uri (string-append
1451 "mirror://cpan/authors/id/J/JM/JMEHNLE/net-dns-resolver-programmable/"
1452 "Net-DNS-Resolver-Programmable-v" version ".tar.gz"))
1453 (sha256
1454 (base32
1455 "1v3nl2kaj4fs55n1617n53q8sa3mir06898vpy1rq98zjih24h4d"))
1456 (patches
1457 (search-patches "perl-net-dns-resolver-programmable-fix.patch"))))
1458 (build-system perl-build-system)
1459 (native-inputs
1460 `(("perl-module-build" ,perl-module-build)))
1461 (inputs `(("perl-net-dns" ,perl-net-dns)))
1462 (home-page
1463 "https://metacpan.org/release/Net-DNS-Resolver-Programmable")
1464 (synopsis
1465 "Programmable DNS resolver class for offline emulation of DNS")
1466 (description "Net::DNS::Resolver::Programmable is a programmable DNS resolver for
1467 offline emulation of DNS.")
1468 (license license:perl-license)))
1469
1470 (define-public perl-net-dns-resolver-mock
1471 (package
1472 (name "perl-net-dns-resolver-mock")
1473 (version "1.20171219")
1474 (source (origin
1475 (method url-fetch)
1476 (uri (string-append
1477 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
1478 "Net-DNS-Resolver-Mock-" version ".tar.gz"))
1479 (sha256
1480 (base32
1481 "0m3rxpkv1b9121srvbqkrgzg4m8mnydiydqv34in1i1ixwrl6jn9"))))
1482 (build-system perl-build-system)
1483 (inputs
1484 `(("perl-net-dns" ,perl-net-dns)))
1485 (home-page "https://metacpan.org/release/Net-DNS-Resolver-Mock")
1486 (synopsis "Mock DNS Resolver object for testing")
1487 (description
1488 "Net::DNS::Resolver::Mock is a subclass of Net::DNS::Resolver, but returns
1489 static data from any provided DNS zone file instead of querying the network.
1490 It is intended primarily for use in testing.")
1491 (license license:perl-license)))
1492
1493 (define-public perl-netaddr-ip
1494 (package
1495 (name "perl-netaddr-ip")
1496 (version "4.079")
1497 (source
1498 (origin
1499 (method url-fetch)
1500 (uri (string-append
1501 "mirror://cpan/authors/id/M/MI/MIKER/NetAddr-IP-"
1502 version
1503 ".tar.gz"))
1504 (sha256
1505 (base32
1506 "1rx0dinrz9fk9qcg4rwqq5n1dm3xv2arymixpclcv2q2nzgq4npc"))))
1507 (build-system perl-build-system)
1508 (arguments
1509 `(#:phases
1510 (modify-phases %standard-phases
1511 (replace 'configure
1512 (lambda* (#:key outputs #:allow-other-keys)
1513 (let* ((out (assoc-ref outputs "out"))
1514 (args `("Makefile.PL"
1515 ,(string-append "PREFIX=" out)
1516 "INSTALLDIRS=site")))
1517 (setenv "CONFIG_SHELL" (which "sh"))
1518 (apply invoke "perl" args)))))))
1519 (home-page
1520 "https://metacpan.org/release/NetAddr-IP")
1521 (synopsis
1522 "Manages IPv4 and IPv6 addresses and subnets")
1523 (description "NetAddr::IP manages IPv4 and IPv6 addresses and subsets.")
1524 (license license:perl-license)))
1525
1526 (define-public perl-net-patricia
1527 (package
1528 (name "perl-net-patricia")
1529 (version "1.22")
1530 (source
1531 (origin
1532 (method url-fetch)
1533 (uri (string-append
1534 "mirror://cpan/authors/id/G/GR/GRUBER/Net-Patricia-"
1535 version
1536 ".tar.gz"))
1537 (sha256
1538 (base32
1539 "0ln5f57vc8388kyh9vhx2infrdzfhbpgyby74h1qsnhwds95m0vh"))))
1540 (build-system perl-build-system)
1541 (arguments
1542 '(#:phases
1543 (modify-phases %standard-phases
1544 (add-after 'unpack 'dont-link-with-nsl ; Borrowed from Debian.
1545 (lambda _
1546 (substitute* "Makefile.PL"
1547 (("-lnsl") ""))
1548 #t)))))
1549 (inputs
1550 `(("perl-net-cidr-lite" ,perl-net-cidr-lite)
1551 ("perl-socket6" ,perl-socket6)))
1552 (home-page
1553 "https://metacpan.org/release/Net-Patricia")
1554 (synopsis
1555 "Patricia Trie Perl module for fast IP address lookups")
1556 (description
1557 "Net::Patricia does IP address lookups quickly in Perl.")
1558 ;; The bindings are licensed under GPL2 or later.
1559 ;; libpatricia is licensed under 2-clause BSD.
1560 (license (list license:gpl2+ license:bsd-2))))
1561
1562 (define-public perl-net-cidr-lite
1563 (package
1564 (name "perl-net-cidr-lite")
1565 (version "0.21")
1566 (source
1567 (origin
1568 (method url-fetch)
1569 (uri (string-append
1570 "mirror://cpan/authors/id/D/DO/DOUGW/Net-CIDR-Lite-"
1571 version
1572 ".tar.gz"))
1573 (sha256
1574 (base32
1575 "14shj73zbqmfjbp0qz1fs9j4p2dpvz5hfkm4qfdjbydflbl2b8fg"))))
1576 (build-system perl-build-system)
1577 (home-page
1578 "https://metacpan.org/release/Net-CIDR-Lite")
1579 (synopsis
1580 "Perl extension for merging IPv4 or IPv6 CIDR addresses")
1581 (description "Net::CIDR::Lite merges IPv4 or IPv6 CIDR addresses.")
1582 (license license:gpl1+)))
1583
1584 ;; TODO: Use the geolite-mirror-simple.pl script from the example
1585 ;; directory to stay current with the databases. How?
1586 (define-public perl-geo-ip
1587 (package
1588 (name "perl-geo-ip")
1589 (version "1.51")
1590 (source
1591 (origin
1592 (method url-fetch)
1593 (uri (string-append
1594 "mirror://cpan/authors/id/M/MA/MAXMIND/Geo-IP-"
1595 version
1596 ".tar.gz"))
1597 (sha256
1598 (base32
1599 "1fka8fr7fw6sh3xa9glhs1zjg3s2gfkhi7n7da1l2m2wblqj0c0n"))))
1600 (build-system perl-build-system)
1601 (home-page "https://metacpan.org/release/Geo-IP")
1602 (synopsis
1603 "Look up location and network information by IP Address in Perl")
1604 (description "The Perl module @code{Geo::IP}. It looks up location and
1605 network information by IP Address.")
1606 (license license:perl-license)))
1607
1608 (define-public perl-io-socket-inet6
1609 (package
1610 (name "perl-io-socket-inet6")
1611 (version "2.72")
1612 (source
1613 (origin
1614 (method url-fetch)
1615 (uri (string-append
1616 "mirror://cpan/authors/id/S/SH/SHLOMIF/IO-Socket-INET6-"
1617 version
1618 ".tar.gz"))
1619 (sha256
1620 (base32
1621 "1fqypz6qa5rw2d5y2zq7f49frwra0aln13nhq5gi514j2zx21q45"))))
1622 (build-system perl-build-system)
1623 (native-inputs
1624 `(("perl-module-build" ,perl-module-build)
1625 ("perl-test-pod" ,perl-test-pod)
1626 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1627 (inputs `(("perl-socket6" ,perl-socket6)))
1628 (arguments `(;; Need network socket API
1629 #:tests? #f))
1630 (home-page
1631 "https://metacpan.org/release/IO-Socket-INET6")
1632 (synopsis
1633 "Perl object interface for AF_INET/AF_INET6 domain sockets")
1634 (description "IO::Socket::INET6 is an interface for AF_INET/AF_INET6 domain
1635 sockets in Perl.")
1636 (license license:perl-license)))
1637
1638 (define-public libproxy
1639 (package
1640 (name "libproxy")
1641 (version "0.4.15")
1642 (source (origin
1643 (method url-fetch)
1644 (uri (string-append "https://github.com/libproxy/libproxy/"
1645 "releases/download/" version "/libproxy-"
1646 version ".tar.xz"))
1647 (sha256
1648 (base32
1649 "0kvdrazlzwia876w988cmlypp253gwy6idlh8mjk958c29jb8kb5"))))
1650 (build-system cmake-build-system)
1651 (native-inputs
1652 `(("pkg-config" ,pkg-config)))
1653 (inputs
1654 `(("dbus" ,dbus)
1655 ("zlib" ,zlib)))
1656 (arguments
1657 `(#:phases
1658 (modify-phases %standard-phases
1659 (replace 'check
1660 (lambda _
1661 (invoke "ctest" "-E" "url-test"))))))
1662 (synopsis "Library providing automatic proxy configuration management")
1663 (description "Libproxy handles the details of HTTP/HTTPS proxy
1664 configuration for applications across all scenarios. Applications using
1665 libproxy only have to specify which proxy to use.")
1666 (home-page "https://libproxy.github.io/libproxy")
1667 (license license:lgpl2.1+)))
1668
1669 (define-public proxychains-ng
1670 (package
1671 (name "proxychains-ng")
1672 (version "4.14")
1673 (source
1674 (origin
1675 (method url-fetch)
1676 (uri (string-append "http://ftp.barfooze.de/pub/sabotage/tarballs/"
1677 "proxychains-ng-" version ".tar.xz"))
1678 (sha256
1679 (base32 "1bmhfbl1bzc87vl0xwr1wh5xvslfyc41nl2hqzhbj258p0sy004x"))))
1680 (build-system gnu-build-system)
1681 (arguments
1682 `(#:tests? #f ; there are no tests
1683 #:phases
1684 (modify-phases %standard-phases
1685 (add-after 'unpack 'fix-configure-script
1686 (lambda _
1687 ;; The configure script is very intolerant to unknown arguments,
1688 ;; such as "CONFIG_SHELL".
1689 (substitute* "configure"
1690 (("\\*\\) break ;;" line)
1691 (string-append "[A-Z]*) shift ;;\n"
1692 line)))
1693 #t))
1694 (add-before 'configure 'set-up-environment
1695 (lambda _
1696 (setenv "CC" "gcc")
1697 #t)))))
1698 (synopsis "Redirect any TCP connection through a proxy or proxy chain")
1699 (description "Proxychains-ng is a preloader which hooks calls to sockets
1700 in dynamically linked programs and redirects them through one or more SOCKS or
1701 HTTP proxies.")
1702 (home-page "https://github.com/rofl0r/proxychains-ng")
1703 (license license:gpl2+)))
1704
1705 (define-public enet
1706 (package
1707 (name "enet")
1708 (version "1.3.15")
1709 (source (origin
1710 (method url-fetch)
1711 (uri (string-append "http://enet.bespin.org/download/"
1712 "enet-" version ".tar.gz"))
1713 (sha256
1714 (base32
1715 "1yxxf9bkx6dx3j8j70fj17c05likyfibb1419ls74hp58qrzdgas"))))
1716 (build-system gnu-build-system)
1717 (native-inputs
1718 `(("pkg-config" ,pkg-config)))
1719 (synopsis "Network communication layer on top of UDP")
1720 (description
1721 "ENet's purpose is to provide a relatively thin, simple and robust network
1722 communication layer on top of UDP. The primary feature it provides is optional
1723 reliable, in-order delivery of packets. ENet omits certain higher level
1724 networking features such as authentication, server discovery, encryption, or
1725 other similar tasks that are particularly application specific so that the
1726 library remains flexible, portable, and easily embeddable.")
1727 (home-page "http://enet.bespin.org")
1728 (license license:expat)))
1729
1730 (define-public sslh
1731 (package
1732 (name "sslh")
1733 (version "1.20")
1734 (source
1735 (origin
1736 (method git-fetch)
1737 (uri (git-reference
1738 (url "https://github.com/yrutschle/sslh.git")
1739 (commit (string-append "v" version))))
1740 (file-name (git-file-name name version))
1741 (sha256
1742 (base32 "18zhkqlwfh6f5dg1a41a4p7p9g94dgb9nwls1ksy9r5yz174i2fx"))))
1743 (build-system gnu-build-system)
1744 (native-inputs
1745 `(;; Test dependencies.
1746 ("lcov" ,lcov)
1747 ("perl" ,perl)
1748 ("perl-conf-libconfig" ,perl-conf-libconfig)
1749 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
1750 ("perl-socket6" ,perl-socket6)
1751 ("psmisc" ,psmisc))) ; for ‘killall’
1752 (inputs
1753 `(("libcap" ,libcap)
1754 ("libconfig" ,libconfig)
1755 ("pcre" ,pcre)
1756 ("tcp-wrappers" ,tcp-wrappers)))
1757 (arguments
1758 '(#:phases
1759 (modify-phases %standard-phases
1760 (delete 'configure) ; no configure script
1761 (add-before 'check 'fix-tests
1762 (lambda _
1763 (substitute* "./t"
1764 (("\"/tmp") "$ENV{\"TMPDIR\"} . \"")
1765 ;; The Guix build environment lacks ‘ip6-localhost’.
1766 (("ip6-localhost") "localhost"))
1767 #t))
1768 ;; Many of these files are mentioned in the man page. Install them.
1769 (add-after 'install 'install-documentation
1770 (lambda* (#:key outputs #:allow-other-keys)
1771 (let* ((out (assoc-ref outputs "out"))
1772 (doc (string-append out "/share/doc/sslh")))
1773 (install-file "README.md" doc)
1774 (for-each
1775 (lambda (file)
1776 (install-file file (string-append doc "/examples")))
1777 (append (find-files "." "\\.cfg")
1778 (find-files "scripts"))))
1779 #t)))
1780 #:make-flags (list "CC=gcc"
1781 "USELIBCAP=1"
1782 "USELIBWRAP=1"
1783 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1784 #:test-target "test"))
1785 (home-page "https://www.rutschle.net/tech/sslh/README.html")
1786 (synopsis "Applicative network protocol demultiplexer")
1787 (description
1788 "sslh is a network protocol demultiplexer. It acts like a switchboard,
1789 accepting connections from clients on one port and forwarding them to different
1790 servers based on the contents of the first received data packet. Detection of
1791 common protocols like HTTP(S), SSL, SSH, OpenVPN, tinc, and XMPP is already
1792 implemented, but any other protocol that matches a regular expression can be
1793 added. sslh's name comes from its original application of serving both SSH and
1794 HTTPS on port 443, allowing SSH connections from inside corporate firewalls
1795 that block port 22.")
1796 (license (list license:bsd-2 ; tls.[ch]
1797 license:gpl2+)))) ; everything else
1798
1799 (define-public iperf
1800 (package
1801 (name "iperf")
1802 (version "3.7")
1803 (source (origin
1804 (method url-fetch)
1805 (uri (string-append "http://downloads.es.net/pub/iperf"
1806 "/iperf-" version ".tar.gz"))
1807 (sha256
1808 (base32
1809 "033is7b5grfbiil98jxlz4ixp9shm44x6hy8flpsyz1i4h108inq"))))
1810 (build-system gnu-build-system)
1811 (synopsis "TCP, UDP and SCTP bandwidth measurement tool")
1812 (description
1813 "iPerf is a tool to measure achievable bandwidth on IP networks. It
1814 supports tuning of various parameters related to timing, buffers and
1815 protocols (TCP, UDP, SCTP with IPv4 and IPv6). For each test it reports
1816 the bandwidth, loss, and other parameters.")
1817 (home-page "https://software.es.net/iperf/")
1818 (license (list license:bsd-3 ; Main distribution.
1819 license:ncsa ; src/{units,iperf_locale,tcp_window_size}.c
1820 license:expat ; src/{cjson,net}.[ch]
1821 license:public-domain)))) ; src/portable_endian.h
1822
1823 (define-public nethogs
1824 (package
1825 (name "nethogs")
1826 (version "0.8.6")
1827 (source
1828 (origin
1829 (method git-fetch)
1830 (uri (git-reference
1831 (url "https://github.com/raboof/nethogs")
1832 (commit (string-append "v" version))))
1833 (hash
1834 (content-hash
1835 (base32 "0sn1sdp86akwlm4r1vmkxjjl50c0xaisk91bbz57z7kcsaphxna9")
1836 sha256))
1837 (file-name (git-file-name name version))))
1838 (build-system gnu-build-system)
1839 (inputs
1840 `(("libpcap" ,libpcap)
1841 ("ncurses" ,ncurses)))
1842 (arguments
1843 `(#:make-flags `("CC=gcc"
1844 ,(string-append "PREFIX=" %output)
1845 ,(string-append "VERSION=" ,version))
1846 #:phases
1847 (modify-phases %standard-phases
1848 (delete 'configure)))) ; no ./configure script.
1849 (home-page "https://github.com/raboof/nethogs")
1850 (synopsis "Per-process bandwidth monitor")
1851 (description "NetHogs is a small 'net top' tool for Linux. Instead of
1852 breaking the traffic down per protocol or per subnet, like most tools do, it
1853 groups bandwidth by process.
1854
1855 NetHogs does not rely on a special kernel module to be loaded. If there's
1856 suddenly a lot of network traffic, you can fire up NetHogs and immediately see
1857 which PID is causing this. This makes it easy to identify programs that have
1858 gone wild and are suddenly taking up your bandwidth.")
1859 (license license:gpl2+)))
1860
1861 (define-public nzbget
1862 (package
1863 (name "nzbget")
1864 (version "21.0")
1865 (source
1866 (origin
1867 (method url-fetch)
1868 (uri (string-append "https://github.com/nzbget/nzbget/releases"
1869 "/download/v" version
1870 "/nzbget-" version "-src.tar.gz"))
1871 (sha256
1872 (base32
1873 "0lwd0pfrs4a5ms193hgz2qiyf7grrc925dw6y0nfc0gkp27db9b5"))
1874 (modules '((guix build utils)))
1875 (snippet
1876 ;; Reported upstream as <https://github.com/nzbget/nzbget/pull/414>.
1877 '(begin
1878 (substitute* "daemon/connect/TlsSocket.cpp"
1879 (("gnutls_certificate-verification_status_print")
1880 "gnutls_certificate_verification_status_print"))
1881 #t))))
1882 (arguments
1883 `(#:configure-flags
1884 (list
1885 (string-append "--with-libcurses-includes="
1886 (assoc-ref %build-inputs "ncurses") "/include")
1887 (string-append "--with-libcurses-libraries="
1888 (assoc-ref %build-inputs "ncurses") "/lib")
1889 (string-append "--with-tlslib=GnuTLS"))))
1890 (build-system gnu-build-system)
1891 (inputs `(("gnutls" ,gnutls)
1892 ("libxml2" ,libxml2)
1893 ("ncurses" ,ncurses)
1894 ("zlib" ,zlib)))
1895 (native-inputs `(("pkg-config" ,pkg-config)))
1896 (home-page "https://github.com/nzbget/nzbget")
1897 (synopsis "Usenet binary file downloader")
1898 (description
1899 "NZBGet is a binary newsgrabber, which downloads files from Usenet based
1900 on information given in @code{nzb} files. NZBGet can be used in standalone
1901 and in server/client modes. In standalone mode, you pass NZBGet @command{nzb}
1902 files as command-line parameters and it downloads them and exits. NZBGet also
1903 contains a Web interface. Its server can be controlled through remote
1904 procedure calls (RPCs).")
1905 (license license:gpl2+)))
1906
1907 (define-public openvswitch
1908 (package
1909 (name "openvswitch")
1910 (version "2.13.0")
1911 (source (origin
1912 (method url-fetch)
1913 (uri (string-append
1914 "https://www.openvswitch.org/releases/openvswitch-"
1915 version ".tar.gz"))
1916 (sha256
1917 (base32
1918 "0cd5vmfr6zwgcnkwys6rag6cmz68v0librpaplianv734xs74pyx"))))
1919 (build-system gnu-build-system)
1920 (arguments
1921 '(;; FIXME: many tests fail with:
1922 ;; […]
1923 ;; test -e $OVS_RUNDIR/ovs-vswitchd.pid
1924 ;; ovs-appctl -t ovs-vswitchd exit
1925 ;; hard failure
1926 #:tests? #f
1927 #:configure-flags
1928 '("--enable-shared"
1929 "--localstatedir=/var"
1930 "--with-dbdir=/var/lib/openvswitch")
1931 #:phases
1932 (modify-phases %standard-phases
1933 (replace 'install
1934 (lambda _
1935 (invoke "make"
1936 ;; Don't try to create directories under /var.
1937 "RUNDIR=/tmp"
1938 "PKIDIR=/tmp"
1939 "LOGDIR=/tmp"
1940 "DBDIR=/tmp"
1941 "install"))))))
1942 (native-inputs
1943 `(("perl" ,perl)
1944 ("pkg-config" ,pkg-config)
1945 ("python" ,python-wrapper)
1946 ;; for testing
1947 ("util-linux" ,util-linux)))
1948 (inputs
1949 `(("libcap-ng" ,libcap-ng)
1950 ("openssl" ,openssl)))
1951 (synopsis "Virtual network switch")
1952 (home-page "https://www.openvswitch.org/")
1953 (description
1954 "Open vSwitch is a multilayer virtual switch. It is designed to enable
1955 massive network automation through programmatic extension, while still
1956 supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
1957 IPFIX, RSPAN, CLI, LACP, 802.1ag).")
1958 (license ; see debian/copyright for detail
1959 (list license:lgpl2.1 ; xenserver and utilities/bugtool
1960 license:gpl2 ; datapath
1961 license:bsd-2 license:bsd-3
1962 license:asl2.0)))) ; all other
1963
1964 (define-public python-ipy
1965 (package
1966 (name "python-ipy")
1967 (version "1.00")
1968 (source (origin
1969 (method url-fetch)
1970 (uri (pypi-uri "IPy" version))
1971 (sha256
1972 (base32
1973 "08d6kcacj67mvh0b6y765ipccy6gi4w2ndd4v1l3im2qm1cgcarg"))))
1974 (build-system python-build-system)
1975 (home-page "https://github.com/autocracy/python-ipy/")
1976 (synopsis "Python class and tools for handling IP addresses and networks")
1977 (description "The @code{IP} class allows a comfortable parsing and
1978 handling for most notations in use for IPv4 and IPv6 addresses and
1979 networks.")
1980 (license license:bsd-3)))
1981
1982 (define-public python2-ipy
1983 (package-with-python2 python-ipy))
1984
1985 (define-public speedtest-cli
1986 (package
1987 (name "speedtest-cli")
1988 (version "2.1.2")
1989 (source
1990 (origin
1991 (method git-fetch)
1992 (uri (git-reference
1993 (url "https://github.com/sivel/speedtest-cli")
1994 (commit (string-append "v" version))))
1995 (file-name (git-file-name name version))
1996 (sha256
1997 (base32 "1456yly6iym2c9bl6pi4sz8xbw34bm2dxm1vzpydsd6jazwpmy26"))))
1998 (build-system python-build-system)
1999 (home-page "https://github.com/sivel/speedtest-cli")
2000 (synopsis "Internet bandwidth tester")
2001 (description
2002 "Command line interface for testing internet bandwidth using
2003 speedtest.net.")
2004 (license license:asl2.0)))
2005
2006 (define-public tftp-hpa
2007 (package
2008 (name "tftp-hpa")
2009 (version "5.2")
2010 (source (origin
2011 (method url-fetch)
2012 (uri (string-append "mirror://kernel.org/software/"
2013 "network/tftp/tftp-hpa/tftp-hpa-" version
2014 ".tar.xz"))
2015 (sha256
2016 (base32
2017 "12vidchglhyc20znq5wdsbhi9mqg90jnl7qr9qs8hbvaz4fkdvmg"))))
2018 (build-system gnu-build-system)
2019 (arguments `(#:tests? #f)) ; no test target
2020 (synopsis "HPA's tftp client")
2021 (description
2022 "This is a tftp client derived from OpenBSD tftp with some extra options
2023 added and bugs fixed. The source includes readline support but it is not
2024 enabled due to license conflicts between the BSD advertising clause and the GPL.")
2025 (home-page "https://git.kernel.org/cgit/network/tftp/tftp-hpa.git/about/")
2026 ;; Some source files are distributed under a 3-clause BSD license, and
2027 ;; others under a 4-clause BSD license. Refer to the files in the source
2028 ;; distribution for clarification.
2029 (license (list license:bsd-3 license:bsd-4))))
2030
2031 (define-public pidentd
2032 (package
2033 (name "pidentd")
2034 (version "3.0.19")
2035 (source
2036 (origin
2037 (method git-fetch)
2038 (uri (git-reference
2039 (url "https://github.com/ptrrkssn/pidentd")
2040 (commit (string-append "v" version))))
2041 (file-name (git-file-name name version))
2042 (sha256
2043 (base32
2044 "1k4rr0b4ygxssbnsykzjvz4hjhazzz4j5arlilyc1iq7b1wzsk7i"))))
2045 (build-system gnu-build-system)
2046 (arguments
2047 `(#:tests? #f)) ; No tests are included
2048 (inputs
2049 `(("openssl" ,openssl-1.0))) ;for the DES library
2050 (home-page "https://www.lysator.liu.se/~pen/pidentd/")
2051 (synopsis "Small Ident Daemon")
2052 (description
2053 "@dfn{Pidentd} (Peter's Ident Daemon) is an identd, which implements a
2054 identification server. Pidentd looks up specific TCP/IP connections and
2055 returns the user name and other information about the connection.")
2056 (license license:public-domain)))
2057
2058 (define-public spiped
2059 (package
2060 (name "spiped")
2061 (version "1.6.1")
2062 (source (origin
2063 (method url-fetch)
2064 (uri (string-append "https://www.tarsnap.com/spiped/spiped-"
2065 version ".tgz"))
2066 (sha256
2067 (base32
2068 "04rpnc53whfky7pp2m9h35gwzwn6788pnl6c1qd576mpknbqjw4d"))))
2069 (build-system gnu-build-system)
2070 (arguments
2071 '(#:test-target "test"
2072 #:make-flags (let* ((out (assoc-ref %outputs "out"))
2073 (bindir (string-append out "/bin"))
2074 (man1dir (string-append out "/share/man/man1")))
2075 (list "CC=gcc" ; It tries to invoke `c99`.
2076 (string-append "BINDIR=" bindir)
2077 (string-append "MAN1DIR=" man1dir)))
2078 #:phases
2079 (modify-phases %standard-phases
2080 (add-after 'unpack 'patch-command-invocations
2081 (lambda _
2082 (substitute* '("Makefile"
2083 "libcperciva/cpusupport/Build/cpusupport.sh"
2084 "libcperciva/POSIX/posix-cflags.sh"
2085 "libcperciva/POSIX/posix-l.sh")
2086 (("command -p") ""))
2087 #t))
2088 (delete 'configure) ; No ./configure script.
2089 (add-after 'install 'install-more-docs
2090 (lambda* (#:key outputs #:allow-other-keys)
2091 (let* ((out (assoc-ref %outputs "out"))
2092 (misc (string-append out "/share/doc/spiped")))
2093 (install-file "DESIGN.md" misc)
2094 #t))))))
2095 (native-inputs
2096 `(("procps" ,procps))) ; `ps` is used by the test suite.
2097 (inputs
2098 `(("openssl" ,openssl)))
2099 (home-page "https://www.tarsnap.com/spiped.html")
2100 (synopsis "Create secure pipes between sockets")
2101 (description "Spiped (pronounced \"ess-pipe-dee\") is a utility for creating
2102 symmetrically encrypted and authenticated pipes between socket addresses, so
2103 that one may connect to one address (e.g., a UNIX socket on localhost) and
2104 transparently have a connection established to another address (e.g., a UNIX
2105 socket on a different system). This is similar to 'ssh -L' functionality, but
2106 does not use SSH and requires a pre-shared symmetric key.")
2107 (license license:bsd-2)))
2108
2109 (define-public quagga
2110 (package
2111 (name "quagga")
2112 (version "1.2.4")
2113 (source (origin
2114 (method url-fetch)
2115 (uri (string-append "mirror://savannah/quagga/quagga-"
2116 version ".tar.gz"))
2117 (sha256
2118 (base32
2119 "1lsksqxij5f1llqn86pkygrf5672kvrqn1kvxghi169hqf1c0r73"))
2120 (patches
2121 (search-patches "quagga-reproducible-build.patch"))))
2122 (build-system gnu-build-system)
2123 (native-inputs `(("pkg-config" ,pkg-config)
2124 ("perl" ,perl)
2125 ("dejagnu" ,dejagnu)))
2126 (inputs `(("readline" ,readline)
2127 ("c-ares" ,c-ares)))
2128 (synopsis "Routing Software Suite")
2129 (description "Quagga is a routing software suite, providing implementations
2130 of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for Unix platforms.
2131
2132 The Quagga architecture consists of a core daemon, @command{zebra}, which
2133 acts as an abstraction layer to the underlying Unix kernel and presents the
2134 Zserv API over a Unix or TCP stream to Quagga clients. It is these Zserv
2135 clients which typically implement a routing protocol and communicate routing
2136 updates to the zebra daemon.")
2137 (home-page "https://www.nongnu.org/quagga/")
2138 (license license:gpl2+)))
2139
2140 (define-public thc-ipv6
2141 (let ((revision "0")
2142 (commit "4bb72573e0950ce6f8ca2800a10748477020029e"))
2143 (package
2144 (name "thc-ipv6")
2145 (version (git-version "3.4" revision commit))
2146 (source (origin
2147 (method git-fetch)
2148 (uri (git-reference
2149 (url "https://github.com/vanhauser-thc/thc-ipv6.git")
2150 (commit commit)))
2151 (file-name (git-file-name name version))
2152 (sha256
2153 (base32
2154 "1x5i6vbsddqc2yks7r1a2fw2fk16qxvd6hpzh1lykjfpkal8fdir"))))
2155 (build-system gnu-build-system)
2156 (arguments
2157 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2158 #:tests? #f ; No test suite.
2159 #:phases
2160 (modify-phases %standard-phases
2161 (delete 'configure) ; No ./configure script.
2162 (add-before 'build 'patch-paths
2163 (lambda _
2164 (substitute* "Makefile"
2165 (("/bin/echo") "echo"))
2166 #t))
2167 (add-after 'install 'install-more-docs
2168 (lambda* (#:key outputs #:allow-other-keys)
2169 (let* ((out (assoc-ref outputs "out"))
2170 (doc (string-append out "/share/thc-ipv6/doc")))
2171 (install-file "README" doc)
2172 (install-file "HOWTO-INJECT" doc)
2173 #t))))))
2174 ;; TODO Add libnetfilter-queue once packaged.
2175 (inputs
2176 `(("libpcap" ,libpcap)
2177 ("openssl" ,openssl)
2178 ("perl" ,perl)))
2179 (home-page "https://github.com/vanhauser-thc/thc-ipv6")
2180 (synopsis "IPv6 security research toolkit")
2181 (description "The THC IPv6 Toolkit provides command-line tools and a library
2182 for researching IPv6 implementations and deployments. It requires Linux 2.6 or
2183 newer and only works on Ethernet network interfaces.")
2184 ;; AGPL 3 with exception for linking with OpenSSL. See the 'LICENSE' file in
2185 ;; the source distribution for more information.
2186 (license license:agpl3))))
2187
2188 (define-public bmon
2189 (package
2190 (name "bmon")
2191 (version "4.0")
2192 (source
2193 (origin
2194 (method url-fetch)
2195 (uri (string-append "https://github.com/tgraf/bmon/releases/download/v"
2196 version "/bmon-" version ".tar.gz"))
2197 (sha256
2198 (base32
2199 "0ylzriv4pwh76344abzl1w219x188gshbycbna35gsyfp09c7z82"))))
2200 (build-system gnu-build-system)
2201 (inputs
2202 `(("libconfuse" ,libconfuse)
2203 ("libnl" ,libnl)
2204 ("ncurses" ,ncurses)))
2205 (native-inputs
2206 `(("pkg-config" ,pkg-config)))
2207 (synopsis "Bandwidth monitor")
2208 (description "bmon is a monitoring and debugging tool to capture
2209 networking-related statistics and prepare them visually in a human-friendly
2210 way. It features various output methods including an interactive curses user
2211 interface and a programmable text output for scripting.")
2212 (home-page "https://github.com/tgraf/bmon")
2213 ;; README.md mentions both the 2-clause BSD and expat licenses, but all
2214 ;; the source files only have expat license headers. Upstream has been
2215 ;; contacted for clarification: https://github.com/tgraf/bmon/issues/59
2216 ;; Update the license field when upstream responds.
2217 (license (list license:bsd-2
2218 license:expat))))
2219
2220 (define-public libnet
2221 (package
2222 (name "libnet")
2223 (version "1.2")
2224 (source
2225 (origin
2226 (method url-fetch)
2227 (uri (string-append "https://github.com/libnet/libnet/releases/download"
2228 "/v" version "/libnet-" version ".tar.gz"))
2229 (sha256
2230 (base32
2231 "19ys9vxk6fg70yzzdxsphfr0rwzgxxhr9b3ykhpg7rfray0qd96a"))))
2232 (build-system gnu-build-system)
2233 (arguments
2234 `(#:phases
2235 (modify-phases %standard-phases
2236 (add-before 'build 'build-doc
2237 (lambda* (#:key make-flags #:allow-other-keys)
2238 (apply invoke "make" "-C" "doc" "doc"
2239 make-flags))))))
2240 (native-inputs
2241 `(;; To build the documentation, Doxygen and Perl is required.
2242 ("doxygen" ,doxygen)
2243 ("perl" ,perl)))
2244 (home-page "https://github.com/libnet/libnet")
2245 (synopsis "Framework for low-level network packet construction")
2246 (description
2247 "Libnet provides a fairly portable framework for network packet
2248 construction and injection. It features portable packet creation interfaces
2249 at the IP layer and link layer, as well as a host of supplementary
2250 functionality. Using libnet, quick and simple packet assembly applications
2251 can be whipped up with little effort.")
2252 (license license:bsd-2)))
2253
2254 (define-public mtr
2255 (package
2256 (name "mtr")
2257 (version "0.93")
2258 (source
2259 (origin
2260 (method url-fetch)
2261 (uri (string-append "ftp://ftp.bitwizard.nl/mtr/"
2262 "mtr-" version ".tar.gz"))
2263 (sha256
2264 (base32 "03gid8g4r6a9r40855s4345xm1bylj2kfqkicjwxpmvvccyng712"))))
2265 (build-system gnu-build-system)
2266 (inputs
2267 `(("libcap" ,libcap)
2268 ("ncurses" ,ncurses)))
2269 (arguments
2270 `(#:tests? #f)) ; tests require network access
2271 (home-page "https://www.bitwizard.nl/mtr/")
2272 (synopsis "Network diagnostic tool")
2273 (description
2274 "@acronym{mtr, My TraceRoute} combines the functionality of the
2275 @command{traceroute} and @command{ping} programs in a single network diagnostic
2276 tool. @command{mtr} can use several network protocols to detect intermediate
2277 routers (or @dfn{hops}) between the local host and a user-specified destination.
2278 It then continually measures the response time and packet loss at each hop, and
2279 displays the results in real time.")
2280 (license license:gpl2+)))
2281
2282 (define-public strongswan
2283 (package
2284 (name "strongswan")
2285 (version "5.8.4")
2286 (source
2287 (origin
2288 (method url-fetch)
2289 (uri (string-append "https://download.strongswan.org/strongswan-"
2290 version ".tar.bz2"))
2291 (sha256
2292 (base32 "0g2m08gmgdi3qvvqz6zy7n16np53sp232xd0rdc2vdhk73img6id"))))
2293 (build-system gnu-build-system)
2294 (arguments
2295 `(#:phases
2296 (modify-phases %standard-phases
2297 (add-before 'build 'patch-command-file-names
2298 (lambda* (#:key inputs #:allow-other-keys)
2299 (substitute* "src/libstrongswan/utils/process.c"
2300 (("/bin/sh")
2301 (string-append (assoc-ref inputs "bash") "/bin/sh")))
2302
2303 (substitute* "src/libstrongswan/tests/suites/test_process.c"
2304 (("/bin/sh") (which "sh"))
2305 (("/bin/echo") (which "echo"))
2306 (("cat") (which "cat")))
2307 #t))
2308 (add-before 'check 'set-up-test-environment
2309 (lambda* (#:key inputs #:allow-other-keys)
2310 (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
2311 "/share/zoneinfo"))
2312 #t)))
2313 #:configure-flags
2314 (list
2315 ;; Disable bsd-4 licensed plugins.
2316 "--disable-des"
2317 "--disable-blowfish")))
2318 (inputs
2319 `(("curl" ,curl)
2320 ("gmp" ,gmp)
2321 ("libgcrypt" ,libgcrypt)
2322 ("openssl" ,openssl)))
2323 (native-inputs
2324 `(("coreutils" ,coreutils)
2325 ("tzdata" ,tzdata-for-tests)))
2326 (synopsis "IKEv1/v2 keying daemon")
2327 (description "StrongSwan is an IPsec implementation originally based upon
2328 the FreeS/WAN project. It contains support for IKEv1, IKEv2, MOBIKE, IPv6,
2329 NAT-T and more.")
2330 (home-page "https://strongswan.org/")
2331 (license
2332 (list license:gpl2+
2333 ;; src/aikgen/*
2334 ;; src/libcharon/plugins/dnscert/*
2335 ;; src/libcharon/plugins/ext_auth/*
2336 ;; src/libcharon/plugins/vici/ruby/*
2337 ;; src/libcharon/plugins/xauth_pam/xauth_pam_listener.[ch]
2338 license:expat
2339 ;; src/inclue/sys/*
2340 license:bsd-3
2341 ;; src/libstrongswan/plugins/sha3/sha3_keccak.c
2342 license:public-domain
2343 ;; src/libstrongswan/plugins/pkcs11/pkcs11.h
2344 (license:non-copyleft
2345 "file://src/libstrongswan/plugins/pkcs11/pkcs11.h"
2346 "pkcs11 contains a unknown permissive license. View the specific
2347 file for more details.")
2348 ;; These files are not included in the
2349 ;; build, they are disabled through
2350 ;; options to ./configure
2351 ;;
2352 ;; src/libstrongswan/plugins/blowfish/bf_enc.c
2353 ;; src/libstrongswan/plugins/blowfish/bf_locl.h
2354 ;; src/libstrongswan/plugins/blowfish/bf_pi.h
2355 ;; src/libstrongswan/plugins/blowfish/bf_skey.c
2356 ;; src/libstrongswan/plugins/blowfish/blowfish_crypter.c
2357 ;; src/libstrongswan/plugins/des/des_crypter.c
2358 license:bsd-4))))
2359
2360 (define-public amule
2361 (package
2362 (name "amule")
2363 (version "2.3.2")
2364 (source (origin
2365 (method git-fetch)
2366 (uri (git-reference
2367 (url "https://github.com/amule-project/amule")
2368 (commit version)))
2369 (file-name (git-file-name name version))
2370 (sha256
2371 (base32
2372 "010wxm6g9f92x6fympj501zbnjka32rzbx0sk3a2y4zpih5d2nsn"))
2373 ;; Patch for adopting crypto++ >= 6.0.
2374 (patches (search-patches "amule-crypto-6.patch"))))
2375 (build-system gnu-build-system)
2376 (arguments
2377 `(#:phases
2378 (modify-phases %standard-phases
2379 (delete 'bootstrap) ; bootstrap phase runs too early.
2380 (add-after 'patch-source-shebangs 'autogen
2381 (lambda _
2382 (invoke "sh" "autogen.sh")
2383 #t)))
2384 #:configure-flags
2385 '("--disable-rpath"
2386 "--enable-wxcas"
2387 "--enable-cas"
2388 "--enable-alc"
2389 "--enable-alcc"
2390 "--enable-xas"
2391 "--enable-amulecmd"
2392 "--enable-geoip"
2393 "--enable-ccache"
2394 "--enable-nls"
2395 "--enable-optimize"
2396 "--enable-amule-gui"
2397 "--enable-amule-daemon"
2398 "--enable-webserver"
2399 "--with-denoise-level=0")))
2400 (native-inputs
2401 `(("autoconf" ,autoconf)
2402 ("automake" ,automake)
2403 ("gettext-minimal" ,gettext-minimal)
2404 ("perl" ,perl)))
2405 (inputs
2406 `(("zlib" ,zlib)
2407 ("crypto++" ,crypto++)
2408 ("libpng" ,libpng)
2409 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2410 (home-page "http://amule.org/")
2411 (synopsis "Peer-to-peer client for the eD2K and Kademlia networks")
2412 (description
2413 "aMule is an eMule-like client for the eD2k and Kademlia peer-to-peer
2414 file sharing networks. It includes a graphical user interface (GUI), a daemon
2415 allowing you to run a client with no graphical interface, and a Web GUI for
2416 remote access. The @command{amulecmd} command allows you to control aMule
2417 remotely.")
2418 (license license:gpl2+)))
2419
2420 (define-public zyre
2421 (package
2422 (name "zyre")
2423 (version "2.0.0")
2424 (source (origin
2425 (method url-fetch)
2426 (uri
2427 (string-append "https://github.com/zeromq/zyre/releases/download/v"
2428 version "/" name "-" version ".tar.gz"))
2429 (sha256
2430 (base32
2431 "0qz2730bng1gs9xbqxhkw88qbsmszgmmrl2g9k6xrg6r3bqvsdc7"))))
2432 (build-system gnu-build-system)
2433 (inputs `(("zeromq" ,zeromq)
2434 ("czmq" ,czmq)
2435 ("libsodium" ,libsodium)))
2436 (synopsis "Framework for proximity-based peer-to-peer applications")
2437 (description "Zyre provides reliable group messaging over local area
2438 networks using zeromq. It has these key characteristics:
2439
2440 @itemize
2441 @item Zyre needs no administration or configuration.
2442 @item Peers may join and leave the network at any time.
2443 @item Peers talk to each other without any central brokers or servers.
2444 @item Peers can talk directly to each other.
2445 @item Peers can join groups, and then talk to groups.
2446 @item Zyre is reliable, and loses no messages even when the network is heavily loaded.
2447 @item Zyre is fast and has low latency, requiring no consensus protocols.
2448 @item Zyre is designed for WiFi networks, yet also works well on Ethernet networks.
2449 @end itemize")
2450 (home-page "https://github.com/zeromq/zyre")
2451 (license license:mpl2.0)))
2452
2453 (define-public can-utils
2454 (package
2455 (name "can-utils")
2456 (version "2018.02.0")
2457 (source (origin
2458 (method git-fetch)
2459 (uri (git-reference
2460 (url "https://github.com/linux-can/can-utils.git")
2461 (commit (string-append "v" version))))
2462 (file-name (git-file-name name version))
2463 (sha256
2464 (base32
2465 "0r0zkm67bdcmbfypjr7z041d4zp0xzb379dyl8cvhmflh12fd2jb"))))
2466 (build-system gnu-build-system)
2467 (arguments
2468 `(#:tests? #f ; No tests exist.
2469 #:make-flags (list "CC=gcc"
2470 (string-append "PREFIX="
2471 (assoc-ref %outputs "out")))
2472 #:phases
2473 (modify-phases %standard-phases
2474 (delete 'bootstrap)
2475 (delete 'configure))))
2476 (home-page "https://github.com/linux-can/can-utils")
2477 (synopsis "CAN utilities")
2478 (description "This package provides CAN utilities in the following areas:
2479
2480 @itemize
2481 @item Basic tools to display, record, generate and replay CAN traffic
2482 @item CAN access via IP sockets
2483 @item CAN in-kernel gateway configuration
2484 @item CAN bus measurement and testing
2485 @item ISO-TP (ISO15765-2:2016 - this means messages with a body larger than
2486 eight bytes) tools
2487 @item Log file converters
2488 @item Serial Line Discipline configuration for slcan driver
2489 @end itemize")
2490 ;; Either BSD-3 or GPL-2 can be used.
2491 (license (list license:bsd-3 license:gpl2))))
2492
2493 (define-public asio
2494 (package
2495 (name "asio")
2496 (version "1.12.2")
2497 (source
2498 (origin
2499 (method url-fetch)
2500 (uri (string-append "mirror://sourceforge/asio/asio/"
2501 version " (Stable)/asio-" version ".tar.bz2"))
2502 (sha256
2503 (base32 "1akray4l3hgahmb92sbvsqg128c7g7s92jrkf1sp1fjnfjrxq9sf"))))
2504 (build-system gnu-build-system)
2505 (inputs
2506 `(("boost" ,boost)
2507 ("openssl" ,openssl)))
2508 (arguments
2509 `(#:configure-flags
2510 (list
2511 (string-append "--with-boost=" (assoc-ref %build-inputs "boost"))
2512 (string-append "--with-openssl=" (assoc-ref %build-inputs "openssl")))))
2513 (home-page "https://think-async.com/Asio")
2514 (synopsis "C++ library for ASynchronous network I/O")
2515 (description "Asio is a cross-platform C++ library for network and
2516 low-level I/O programming that provides developers with a consistent
2517 asynchronous model using a modern C++ approach.")
2518 (license license:boost1.0)))
2519
2520 (define-public shadowsocks
2521 ;; There are some security fixes after the last release.
2522 (let* ((commit "e332ec93e9c90f1cbee676b022bf2c5d5b7b1239")
2523 (revision "0")
2524 (version (git-version "2.8.2" revision commit)))
2525 (package
2526 (name "shadowsocks")
2527 (version version)
2528 (home-page "https://github.com/shadowsocks/shadowsocks")
2529 (source (origin
2530 (method git-fetch)
2531 (uri (git-reference
2532 (url home-page)
2533 (commit commit)))
2534 (sha256
2535 (base32
2536 "1idd9b4f2pnhcpk1bh030hqg5zq25gkwxd53xi3c0cj242w7sp2j"))
2537 (file-name (git-file-name name version))))
2538 (build-system python-build-system)
2539 (synopsis "Fast tunnel proxy that helps you bypass firewalls")
2540 (description
2541 "This package is a fast tunnel proxy that helps you bypass firewalls.
2542
2543 Features:
2544 @itemize
2545 @item TCP & UDP support
2546 @item User management API
2547 @item TCP Fast Open
2548 @item Workers and graceful restart
2549 @item Destination IP blacklist
2550 @end itemize")
2551 (license license:asl2.0))))
2552
2553 (define-public net-snmp
2554 (package
2555 (name "net-snmp")
2556 (version "5.8")
2557 (source (origin
2558 (method url-fetch)
2559 (uri (string-append "mirror://sourceforge/net-snmp/net-snmp/"
2560 version "/net-snmp-" version ".tar.gz"))
2561 (sha256
2562 (base32
2563 "1pvajzj9gmj56dmwix0ywmkmy2pglh6nny646hkm7ghfhh03bz5j"))
2564 (modules '((guix build utils)))
2565 (snippet
2566 '(begin
2567 ;; Drop bundled libraries.
2568 (delete-file-recursively "snmplib/openssl")
2569 #t))))
2570 (build-system gnu-build-system)
2571 (arguments
2572 `(#:test-target "test"
2573 ;; XXX: With parallel build enabled, Perl modules may not get linked with
2574 ;; libnetsnmp. See e.g. <https://bugzilla.novell.com/show_bug.cgi?id=819497>.
2575 #:parallel-build? #f
2576 #:configure-flags
2577 (list (string-append "LDFLAGS=-Wl,-rpath="
2578 (assoc-ref %outputs "out")
2579 "/lib")
2580 "--with-logfile=/var/log/snmpd.log"
2581 (string-append "--with-openssl="
2582 (assoc-ref %build-inputs "openssl")))
2583 #:phases
2584 (modify-phases %standard-phases
2585 (add-after 'unpack 'patch-tests
2586 (lambda* (#:key inputs #:allow-other-keys)
2587 (substitute* "testing/fulltests/support/simple_TESTCONF.sh"
2588 (("NETSTAT=\"\"")
2589 (string-append "NETSTAT=\"" (which "netstat") "\"")))
2590 (substitute* '("testing/fulltests/default/T065agentextend_simple"
2591 "testing/fulltests/default/T115agentxperl_simple")
2592 (("/usr/bin/env") (which "env")))
2593 (substitute* "testing/fulltests/default/T065agentextend_sh_simple"
2594 (("/bin/sh") (which "sh")))
2595 ;; These tests require network access.
2596 (for-each delete-file
2597 '("testing/fulltests/default/T070com2sec_simple"
2598 "testing/fulltests/default/T071com2sec6_simple"))
2599 #t))
2600 (add-after 'unpack 'patch-Makefile.PL
2601 (lambda* (#:key outputs #:allow-other-keys)
2602 (substitute* "Makefile.in"
2603 (("Makefile.PL -NET")
2604 (string-append "Makefile.PL PREFIX="
2605 (assoc-ref outputs "out")
2606 " INSTALLDIRS=site" " NO_PERLLOCAL=1"
2607 " -NET")))
2608 #t)))))
2609 (inputs
2610 `(("perl" ,perl)
2611 ("openssl" ,openssl)
2612 ("libnl" ,libnl)))
2613 ;; These inputs are only needed for tests.
2614 (native-inputs
2615 `(("net-tools" ,net-tools)
2616 ("coreutils" ,coreutils)
2617 ("grep" ,grep)))
2618 (home-page "http://www.net-snmp.org/")
2619 (synopsis "Simple Network Management Protocol library and tools")
2620 (description "The @dfn{Simple Network Management Protocol} (SNMP) is a
2621 widely used protocol for monitoring the health and welfare of network
2622 equipment (e.g. routers), computer equipment and even devices like UPSs.
2623 Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and
2624 SNMP v3 using both IPv4 and IPv6.")
2625 ;; This only affects OpenBSD
2626 ;; https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8100
2627 (properties `((lint-hidden-cve . ("CVE-2015-8100"))))
2628 (license (list license:bsd-3
2629 (license:non-copyleft
2630 "http://www.net-snmp.org/about/license.html"
2631 "CMU/UCD copyright notice")))))
2632
2633 (define-public ubridge
2634 (package
2635 (name "ubridge")
2636 (version "0.9.18")
2637 (source
2638 (origin
2639 (method git-fetch)
2640 (uri (git-reference
2641 (url "https://github.com/GNS3/ubridge.git")
2642 (commit (string-append "v" version))))
2643 (file-name (git-file-name name version))
2644 (sha256
2645 (base32 "0jg66jhhpv4c9340fsdp64hf9h253i8r81fknxa0gq241ripp3jn"))))
2646 (build-system gnu-build-system)
2647 (arguments
2648 `(#:tests? #f ; no tests
2649 #:make-flags
2650 (list ,(string-append "CC=" (cc-for-target)))
2651 #:phases
2652 (modify-phases %standard-phases
2653 (delete 'configure) ; no configure script
2654 (add-before 'install 'set-bindir
2655 (lambda* (#:key inputs outputs #:allow-other-keys)
2656 (let ((bin (string-append (assoc-ref outputs "out")
2657 "/bin")))
2658 (mkdir-p bin)
2659 (substitute* "Makefile"
2660 (("\\$\\(BINDIR\\)") bin)
2661 (("\tsetcap cap_net.*$") "")))
2662 #t)))))
2663 (inputs
2664 `(("libpcap" ,libpcap)))
2665 (home-page "https://github.com/GNS3/ubridge/")
2666 (synopsis "Bridge for UDP tunnels, Ethernet, TAP and VMnet interfaces")
2667 (description "uBridge is a simple program to create user-land bridges
2668 between various technologies. Currently, bridging between UDP tunnels,
2669 Ethernet and TAP interfaces is supported. Packet capture is also supported.")
2670 (license license:gpl3+)))
2671
2672 (define-public hcxtools
2673 (package
2674 (name "hcxtools")
2675 (version "5.2.0")
2676 (source
2677 (origin
2678 (method git-fetch)
2679 (uri (git-reference
2680 (url "https://github.com/ZerBea/hcxtools.git")
2681 (commit version)))
2682 (sha256
2683 (base32 "0k2qlq9hz5zc21nyc6yrnfqzga7hydn5mm0x3rpl2fhkwl81lxcn"))
2684 (file-name (git-file-name name version))))
2685 (build-system gnu-build-system)
2686 (inputs
2687 `(("curl" ,curl)
2688 ("libpcap" ,libpcap)
2689 ("openssl" ,openssl)
2690 ("zlib" ,zlib)))
2691 (arguments
2692 `(#:make-flags
2693 (list "CC=gcc"
2694 (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
2695 #:tests? #f ; no test suite
2696 #:phases
2697 (modify-phases %standard-phases
2698 (delete 'configure))))
2699 (home-page "https://github.com/ZerBea/hcxtools")
2700 (synopsis "Capture wlan traffic to hashcat and John the Ripper")
2701 (description
2702 "This package contains a small set of tools to capture and convert
2703 packets from wireless devices for use with hashcat or John the Ripper.")
2704 (license license:expat)))
2705
2706 (define-public hcxdumptool
2707 (package
2708 (name "hcxdumptool")
2709 (version "6.0.6")
2710 (source
2711 (origin
2712 (method git-fetch)
2713 (uri (git-reference
2714 (url "https://github.com/ZerBea/hcxdumptool.git")
2715 (commit version)))
2716 (sha256
2717 (base32 "1b4d543y64ib92w9gcmiyjn5hz2vyjqmxk3f3yr1zk04fhw16gmf"))
2718 (file-name (git-file-name name version))))
2719 (build-system gnu-build-system)
2720 (arguments
2721 `(#:make-flags
2722 (list ,(string-append "CC=" (cc-for-target))
2723 (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
2724 #:tests? #f ; no test suite
2725 #:phases
2726 (modify-phases %standard-phases
2727 (delete 'configure))))
2728 (inputs
2729 `(("openssl" ,openssl)))
2730 (home-page "https://github.com/ZerBea/hcxdumptool")
2731 (synopsis "Small tool to capture packets from wlan devices")
2732 (description
2733 "Small tool to capture packets from WLAN devices. After capturing,
2734 upload the \"uncleaned\" cap to @url{https://wpa-sec.stanev.org/?submit} to
2735 see if the access point or the client is vulnerable to a dictionary attack.
2736 Convert the cap file to hccapx format and/or to WPA-PMKID-PBKDF2
2737 hashline (16800) with @command{hcxpcaptool} from the @code{hcxtools} package
2738 and check if the WLAN key or the master key was transmitted unencrypted.")
2739 (license license:expat)))
2740
2741 (define-public dante
2742 (package
2743 (name "dante")
2744 (version "1.4.2")
2745 (source
2746 (origin
2747 (method url-fetch)
2748 (uri (string-append "https://www.inet.no/dante/files/dante-"
2749 version ".tar.gz"))
2750 (sha256
2751 (base32
2752 "19rqzj167q73ag20zxpvswhkk0bj56r5maf83v5016sw7vrcz5sc"))))
2753 (build-system gnu-build-system)
2754 (arguments
2755 ;; XXX: The dynamic socks library doesn't work with 'libc.so' (GNU ld
2756 ;; script). When preloading is enabled, 'sockd' failed with:
2757 ;; … Failed to open library "libc.so": …: invalid ELF header
2758 '(#:configure-flags '("--disable-preload")))
2759 (home-page "https://www.inet.no/dante/")
2760 (synopsis "SOCKS server and client")
2761 (description "Dante is a SOCKS client and server implementation. It can
2762 be installed on a machine with access to an external TCP/IP network and will
2763 allow all other machines, without direct access to that network, to be relayed
2764 through the machine the Dante server is running on. The external network will
2765 never see any machines other than the one Dante is running on.")
2766 (license (license:non-copyleft "file://LICENSE"))))
2767
2768 (define-public restbed
2769 (let ((commit "6eb385fa9051203f28bf96cc1844bbb5a9a6481f"))
2770 (package
2771 (name "restbed")
2772 (version (git-version "4.6" "1" commit))
2773 (source
2774 (origin
2775 (method git-fetch)
2776 (uri (git-reference
2777 (url "https://github.com/Corvusoft/restbed/")
2778 (commit commit)))
2779 (file-name (string-append name "-" version ".tar.gz"))
2780 (sha256
2781 (base32 "0k60i5drklqqrb4khb25fzkgz9y0sncxf1sp6lh2bm1m0gh0661n"))))
2782 (build-system cmake-build-system)
2783 (inputs
2784 `(("asio" ,asio)
2785 ("catch" ,catch-framework)
2786 ("openssl" ,openssl)))
2787 (arguments
2788 `(#:tests? #f
2789 #:configure-flags
2790 '("-DBUILD_TESTS=NO"
2791 "-DBUILD_EXAMPLES=NO"
2792 "-DBUILD_SSL=NO"
2793 "-DBUILD_SHARED=NO")
2794 #:phases
2795 (modify-phases %standard-phases
2796 (add-after 'unpack 'apply-patches-and-fix-paths
2797 (lambda* (#:key inputs #:allow-other-keys)
2798 (let ((asio (assoc-ref inputs "asio"))
2799 (catch (assoc-ref inputs "catch"))
2800 (openssl (assoc-ref inputs "openssl")))
2801 (substitute* "cmake/Findasio.cmake"
2802 (("(find_path\\( asio_INCLUDE asio\\.hpp HINTS ).*$" all begin)
2803 (string-append begin " \"" asio "/include\" )")))
2804 (substitute* "cmake/Findcatch.cmake"
2805 (("(find_path\\( catch_INCLUDE catch\\.hpp HINTS ).*$" all begin)
2806 (string-append begin " \"" catch "/include\" )")))
2807 (substitute* "cmake/Findopenssl.cmake"
2808 (("(find_library\\( ssl_LIBRARY ssl ssleay32 HINTS ).*$" all begin)
2809 (string-append begin " \"" openssl "/lib\" )"))
2810 (("(find_library\\( crypto_LIBRARY crypto libeay32 HINTS ).*$" all begin)
2811 (string-append begin " \"" openssl "/lib\" )"))
2812 (("(find_path\\( ssl_INCLUDE openssl/ssl\\.h HINTS ).*$" all begin)
2813 (string-append begin " \"" openssl "/include\" )")))))))))
2814 (synopsis "Asynchronous RESTful functionality to C++11 applications")
2815 (description "Restbed is a comprehensive and consistent programming
2816 model for building applications that require seamless and secure
2817 communication over HTTP.")
2818 (home-page "https://github.com/Corvusoft/restbed")
2819 (license license:agpl3+))))
2820
2821 (define-public restinio
2822 (package
2823 (name "restinio")
2824 (version "0.6.1.1")
2825 (source (origin
2826 (method git-fetch)
2827 (uri (git-reference
2828 (url "https://github.com/Stiffstream/restinio.git")
2829 (commit (string-append "v." version))))
2830 (file-name (git-file-name name version))
2831 (sha256
2832 (base32
2833 "141a96hx8zhcdv121g6cs91n46kb47y040v25pnvz5f54964z7f5"))))
2834 (build-system cmake-build-system)
2835 (inputs ; TODO: Need to force-keep references on some inputs, e.g. boost.
2836 `(("zlib" ,zlib)
2837 ("catch2" ,catch-framework2)
2838 ("openssl" ,openssl)
2839 ("boost" ,boost)
2840 ("pcre" ,pcre)
2841 ("pcre2" ,pcre2)
2842 ("sobjectizer" ,sobjectizer)))
2843 (propagated-inputs
2844 `(("asio", asio)
2845 ("fmt" ,fmt)
2846 ("http-parser", http-parser)))
2847 (arguments
2848 `(#:configure-flags '("-DRESTINIO_INSTALL=on")
2849 #:tests? #f ; TODO: The tests are called from the root CMakelist, need RESTINIO_TEST=on.
2850 #:phases
2851 (modify-phases %standard-phases
2852 (add-after 'unpack 'change-directory
2853 (lambda _
2854 (chdir "dev/restinio")
2855 #t)))))
2856 (home-page "https://stiffstream.com/en/products/restinio.html")
2857 (synopsis "C++14 library that gives you an embedded HTTP/Websocket server")
2858 (description "RESTinio is a header-only C++14 library that gives you an embedded
2859 HTTP/Websocket server. It is based on standalone version of ASIO
2860 and targeted primarily for asynchronous processing of HTTP-requests.")
2861 (license license:bsd-3)))
2862
2863 (define-public opendht
2864 (package
2865 (name "opendht")
2866 (version "2.0.0")
2867 (source (origin
2868 (method git-fetch)
2869 (uri (git-reference
2870 (url "https://github.com/savoirfairelinux/opendht.git")
2871 (commit version)))
2872 (file-name (git-file-name name version))
2873 (sha256
2874 (base32
2875 "1q1fwk8wwk9r6bp0indpr60ql668lsk16ykslacyhrh7kg97kvhr"))))
2876 ;; Since 2.0, the gnu-build-system does not seem to work anymore, upstream bug?
2877 (build-system cmake-build-system)
2878 (inputs
2879 `(("gnutls" ,gnutls)
2880 ("nettle" ,nettle)
2881 ("readline" ,readline)
2882 ("jsoncpp" ,jsoncpp)
2883 ("openssl" ,openssl)
2884 ("fmt" ,fmt)))
2885 (propagated-inputs
2886 `(("argon2" ,argon2) ; TODO: Needed for the pkg-config .pc file to work?
2887 ("msgpack" ,msgpack))) ;included in several installed headers
2888 (native-inputs
2889 `(("autoconf" ,autoconf)
2890 ("pkg-config" ,pkg-config)
2891 ("restinio" ,restinio)
2892 ("automake" ,automake)
2893 ("libtool" ,libtool)
2894 ("cppunit" ,cppunit)))
2895 (arguments
2896 `(#:tests? #f ; Tests require network connection.
2897 #:configure-flags
2898 '(;; "-DOPENDHT_TESTS=on"
2899 "-DOPENDHT_TOOLS=off"
2900 "-DOPENDHT_PYTHON=off"
2901 "-DOPENDHT_PROXY_SERVER=on"
2902 "-DOPENDHT_PUSH_NOTIFICATIONS=on"
2903 "-DOPENDHT_PROXY_SERVER_IDENTITY=on"
2904 "-DOPENDHT_PROXY_CLIENT=on")))
2905 (home-page "https://github.com/savoirfairelinux/opendht/")
2906 (synopsis "Distributed Hash Table (DHT) library")
2907 (description "OpenDHT is a Distributed Hash Table (DHT) library. It may
2908 be used to manage peer-to-peer network connections as needed for real time
2909 communication.")
2910 (license license:gpl3+)))
2911
2912 (define-public frrouting
2913 (package
2914 (name "frrouting")
2915 (version "6.0.2")
2916 (source (origin
2917 (method url-fetch)
2918 (uri (string-append "https://github.com/FRRouting/frr/releases/"
2919 "download/frr-" version "/frr-" version
2920 ".tar.xz"))
2921 (sha256
2922 (base32
2923 "0xfrvi62w8qlh46f504ka0skb7pm0g0p8vmdng4w90gsbirlzpdd"))))
2924 (build-system gnu-build-system)
2925 (inputs
2926 `(("c-ares" ,c-ares)
2927 ("json-c" ,json-c)
2928 ("readline" ,readline)))
2929 (native-inputs
2930 `(("perl" ,perl)
2931 ("pkg-config" ,pkg-config)
2932 ("python" ,python-wrapper)
2933 ("python-pytest" ,python-pytest)))
2934 (home-page "https://frrouting.org/")
2935 (synopsis "IP routing protocol suite")
2936 (description "FRRouting (FRR) is an IP routing protocol suite which includes
2937 protocol daemons for BGP, IS-IS, LDP, OSPF, PIM, and RIP. ")
2938 (license license:gpl2+)))
2939
2940 (define-public iwd
2941 (package
2942 (name "iwd")
2943 (version "0.21")
2944 (source (origin
2945 (method git-fetch)
2946 (uri (git-reference
2947 (url "https://git.kernel.org/pub/scm/network/wireless/iwd.git")
2948 (commit version)))
2949 (file-name (git-file-name name version))
2950 (sha256
2951 (base32
2952 "001dikinsa6kshwscjbvwipavzwpqnpvx9fpshcn63gbvbhyd393"))))
2953 (build-system gnu-build-system)
2954 (inputs
2955 `(("dbus" ,dbus)
2956 ("ell" ,ell)
2957 ("readline" ,readline)))
2958 (native-inputs
2959 `(("asciidoc" ,asciidoc)
2960 ("autoconf" ,autoconf)
2961 ("automake" ,automake)
2962 ("libtool" ,libtool)
2963 ("pkgconfig" ,pkg-config)
2964 ("python" ,python)
2965 ("openssl" ,openssl)))
2966 (arguments
2967 `(#:configure-flags
2968 (let ((dbus (assoc-ref %outputs "out")))
2969 (list "--disable-systemd-service"
2970 "--enable-external-ell"
2971 "--enable-hwsim"
2972 "--enable-tools"
2973 "--enable-wired"
2974 "--enable-docs"
2975 "--localstatedir=/var"
2976 (string-append "--with-dbus-datadir=" dbus "/share/")
2977 (string-append "--with-dbus-busdir="
2978 dbus "/share/dbus-1/system-services")))
2979 #:phases
2980 (modify-phases %standard-phases
2981 (add-before 'bootstrap 'pre-bootstrap
2982 (lambda _
2983 (substitute* "Makefile.am"
2984 ;; Test disabled because it needs the kernel module
2985 ;; 'pkcs8_key_parser' loaded.
2986 (("unit\\/test-eapol.*? ") "")
2987 ;; Don't try to 'mkdir /var'.
2988 (("\\$\\(MKDIR_P\\) -m 700") "true"))
2989 #t)))))
2990 (home-page "https://git.kernel.org/pub/scm/network/wireless/iwd.git/")
2991 (synopsis "Internet Wireless Daemon")
2992 (description "iwd is a wireless daemon for Linux that aims to replace WPA
2993 Supplicant. It optimizes resource utilization by not depending on any external
2994 libraries and instead utilizing features provided by the Linux kernel to the
2995 maximum extent possible.")
2996 (license license:lgpl2.1+)))
2997
2998 (define-public batctl
2999 (package
3000 (name "batctl")
3001 (version "2020.1")
3002 (source
3003 (origin
3004 (method url-fetch)
3005 (uri (string-append "https://downloads.open-mesh.org/batman/releases/batman-adv-"
3006 version "/batctl-" version ".tar.gz"))
3007 (sha256
3008 (base32 "0fy252q1my3a57v6pfz8i97h6zv7v03di01dhwjkj47pqnx1rqm3"))))
3009 (inputs
3010 `(("libnl" ,libnl)))
3011 (native-inputs
3012 `(("pkg-config" ,pkg-config)))
3013 (build-system gnu-build-system)
3014 (arguments
3015 `(#:tests? #f
3016 ;; Batctl only has a makefile. Thus we disable tests and
3017 ;; configuration, passing in a few make-flags.
3018 #:phases (modify-phases %standard-phases (delete 'configure))
3019 #:make-flags
3020 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3021 (string-append "PKG_CONFIG=" (assoc-ref %build-inputs "pkg-config")
3022 "/bin/pkg-config")
3023 "CC=gcc")))
3024 (home-page "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki")
3025 (synopsis "Management tool for the mesh networking BATMAN protocol")
3026 (description "This package provides a control tool for the
3027 B.A.T.M.A.N. mesh networking routing protocol provided by the Linux kernel
3028 module @code{batman-adv}, for Layer 2.")
3029 (license license:gpl2+)))
3030
3031 (define-public pagekite
3032 (package
3033 (name "pagekite")
3034 (version "1.5.2.200603")
3035 (source
3036 (origin
3037 (method git-fetch)
3038 (uri (git-reference
3039 (url "https://github.com/pagekite/PyPagekite.git")
3040 (commit (string-append "v" version))))
3041 (file-name (git-file-name name version))
3042 (sha256
3043 (base32 "08rcyr54dssnpand6y26f8x9cjmd91hr44my08kxw70s5iqiwizv"))))
3044 (build-system python-build-system)
3045 (arguments
3046 `(#:phases
3047 (modify-phases %standard-phases
3048 (add-after 'install 'install-man-page
3049 (lambda* (#:key inputs outputs #:allow-other-keys)
3050 (let* ((out (assoc-ref outputs "out"))
3051 (man (string-append out "/share/man")))
3052 (invoke "make"
3053 (string-append "PYTHONPATH=" (getenv "PYTHONPATH"))
3054 "doc/pagekite.1")
3055 (install-file "doc/pagekite.1" (string-append man "/man1"))
3056 #t))))))
3057 (inputs
3058 `(("python-six" ,python-six)
3059 ("python-socksipychain" ,python-socksipychain)))
3060 (home-page "https://pagekite.net/")
3061 (synopsis "Make localhost servers publicly visible")
3062 (description
3063 "PageKite implements a tunneled reverse proxy which makes it easy to make
3064 a service (such as an HTTP or SSH server) on localhost visible to the wider
3065 Internet, even behind NAT or restrictive firewalls. A managed front-end relay
3066 service is available at @url{https://pagekite.net/}, or you can run your own.")
3067 (license license:agpl3+)))
3068
3069 (define-public ipcalc
3070 (package
3071 (name "ipcalc")
3072 (version "0.41")
3073 (source (origin
3074 (method url-fetch)
3075 (uri (string-append "http://jodies.de/ipcalc-archive/"
3076 name "-" version ".tar.gz"))
3077 (sha256
3078 (base32
3079 "12if9sm8h2ac0pgwkw835cgyqjxm6h27k4kfn2vfas9krrqwbafx"))))
3080 (inputs `(("perl" ,perl)
3081 ("tar" ,tar)
3082 ("gzip" ,gzip)
3083 ("tarball" ,source)))
3084 (build-system trivial-build-system) ;no Makefile.PL
3085 (arguments
3086 `(#:modules ((guix build utils))
3087 #:builder
3088 (begin
3089 (use-modules (guix build utils))
3090 (use-modules (srfi srfi-1))
3091 (let* ((source (assoc-ref %build-inputs "source"))
3092 (perl (string-append (assoc-ref %build-inputs "perl")
3093 "/bin"))
3094 (tar (assoc-ref %build-inputs "tar"))
3095 (gz (assoc-ref %build-inputs "gzip"))
3096 (out (assoc-ref %outputs "out"))
3097 (bin (string-append out "/bin"))
3098 (doc (string-append out "/share/doc/ipcalc")))
3099 (setenv "PATH" (string-append gz "/bin"))
3100 (invoke (string-append tar "/bin/tar") "xvf" source)
3101 (chdir (string-append ,name "-" ,version))
3102
3103 (install-file "ipcalc" bin)
3104 (patch-shebang (string-append bin "/ipcalc") (list perl))
3105 #t))))
3106 (synopsis "Simple IP network calculator")
3107 (description "ipcalc takes an IP address and netmask and calculates the
3108 resulting broadcast, network, Cisco wildcard mask, and host range. By giving
3109 a second netmask, you can design subnets and supernets. It is also intended
3110 to be a teaching tool and presents the subnetting results as
3111 easy-to-understand binary values.")
3112 (home-page "http://jodies.de/ipcalc")
3113 (license license:gpl2+)))
3114
3115 (define-public tunctl
3116 (package
3117 (name "tunctl")
3118 (version "1.5")
3119 (source
3120 (origin
3121 (method url-fetch)
3122 (uri (string-append "mirror://sourceforge/tunctl/tunctl/" version "/"
3123 "tunctl-" version ".tar.gz"))
3124 (sha256
3125 (base32 "1zsgn7w6l2zh2q0j6qaw8wsx981qcr536qlz1lgb3b5zqr66qama"))))
3126 (build-system gnu-build-system)
3127 (arguments
3128 `(#:phases
3129 (modify-phases %standard-phases
3130 (delete 'bootstrap) ;there is no configure.ac file
3131 (delete 'configure) ;there is no configure script
3132 (delete 'check) ;there are no tests
3133 (replace 'build
3134 (lambda _
3135 (setenv "CC" "gcc")
3136 (invoke "make" "tunctl")))
3137 ;; TODO: Requires docbook2x to generate man page from SGML.
3138 (replace 'install
3139 (lambda* (#:key outputs #:allow-other-keys)
3140 (let* ((out (assoc-ref outputs "out"))
3141 (bin (string-append out "/bin")))
3142 (install-file "tunctl" bin))
3143 #t)))))
3144 (home-page "http://tunctl.sourceforge.net")
3145 (synopsis "Utility to set up and maintain TUN/TAP network interfaces")
3146 (description "Tunctl is used to set up and maintain persistent TUN/TAP
3147 network interfaces, enabling user applications to simulate network traffic.
3148 Such interfaces are useful for VPN software, virtualization, emulation,
3149 simulation, and a number of other applications.")
3150 (license license:gpl2)))
3151
3152 (define-public wol
3153 (package
3154 (name "wol")
3155 (version "0.7.1")
3156 (source
3157 (origin
3158 (method url-fetch)
3159 (uri (string-append "mirror://sourceforge/wake-on-lan/wol/"
3160 version "/wol-" version ".tar.gz"))
3161 (sha256
3162 (base32 "08i6l5lr14mh4n3qbmx6kyx7vjqvzdnh3j9yfvgjppqik2dnq270"))))
3163 (build-system gnu-build-system)
3164 (home-page "https://sourceforge.net/projects/wake-on-lan/")
3165 (synopsis "Implements Wake On LAN functionality in a small program")
3166 (description "Tool to send a magic packet to wake another host on the
3167 network. This must be enabled on the target host, usually in the BIOS.")
3168 (license license:gpl2)))
3169
3170 (define-public vde2
3171 (package
3172 (name "vde2")
3173 (version "2.3.2")
3174 (source
3175 (origin
3176 (method url-fetch)
3177 (uri "mirror://sourceforge/vde/vde2/2.3.2/vde2-2.3.2.tar.gz")
3178 (sha256
3179 (base32 "14xga0ib6p1wrv3hkl4sa89yzjxv7f1vfqaxsch87j6scdm59pr2"))))
3180 (build-system gnu-build-system)
3181 (arguments
3182 `(#:parallel-build? #f)) ; Build fails if #t.
3183 (inputs
3184 `(("python" ,python)
3185 ("libpcap" ,libpcap)
3186 ("openssl" ,openssl-1.0))) ; Build fails with 1.1.
3187 (home-page "https://github.com/virtualsquare/vde-2")
3188 (synopsis "Virtual Distributed Ethernet")
3189 (description "VDE is a set of programs to provide virtual software-defined
3190 Ethernet network interface controllers across multiple virtual or
3191 physical, local or remote devices. The VDE architecture provides
3192 virtual counterparts to hardware components such as switches and
3193 cables.")
3194 (license (list license:gpl2
3195 license:lgpl2.1 ; libvdeplug
3196 (license:non-copyleft ; slirpvde
3197 "file://COPYING.slirpvde"
3198 "See COPYING.slirpvde in the distribution.")))))
3199
3200 (define-public haproxy
3201 (package
3202 (name "haproxy")
3203 (version "2.1.7")
3204 (source (origin
3205 (method url-fetch)
3206 (uri (string-append "https://www.haproxy.org/download/"
3207 (version-major+minor version)
3208 "/src/haproxy-" version ".tar.gz"))
3209 (sha256
3210 (base32
3211 "0fd3c1znid5a9w3gcf77b85hm2a2558w9s02c4b7xzkmivqnqbir"))))
3212 (build-system gnu-build-system)
3213 (arguments
3214 `(#:make-flags
3215 (let* ((out (assoc-ref %outputs "out")))
3216 (list (string-append "PREFIX=" out)
3217 (string-append "DOCDIR=" out "/share/" ,name)
3218 "TARGET=linux-glibc"
3219 "USE_LUA=1"
3220 "USE_OPENSSL=1"
3221 "USE_ZLIB=1"
3222 "USE_PCRE_2=1"))
3223 #:tests? #f ; there are only regression tests, using varnishtest
3224 #:phases
3225 (modify-phases %standard-phases
3226 (delete 'configure))))
3227 (inputs
3228 `(("lua" ,lua)
3229 ("openssl" ,openssl)
3230 ("pcre2" ,pcre2)
3231 ("zlib" ,zlib)))
3232 (home-page "https://www.haproxy.org/")
3233 (synopsis "Reliable, high performance TCP/HTTP load balancer")
3234 (description "HAProxy is a free, very fast and reliable solution offering
3235 high availability, load balancing, and proxying for TCP and HTTP-based
3236 applications. It is particularly suited for web sites crawling under very
3237 high loads while needing persistence or Layer7 processing. Supporting tens of
3238 thousands of connections is clearly realistic with today's hardware.")
3239 (license (list license:gpl2+
3240 license:lgpl2.1
3241 license:lgpl2.1+))))
3242
3243 (define-public lldpd
3244 (package
3245 (name "lldpd")
3246 (version "1.0.5")
3247 (source
3248 (origin
3249 (method url-fetch)
3250 (uri (string-append "https://media.luffy.cx/files/lldpd/lldpd-"
3251 version ".tar.gz"))
3252 (sha256
3253 (base32
3254 "16fbqrs3l976gdslx647nds8x7sz4h5h3h4l4yxzrayvyh9b5lrd"))
3255 (modules '((guix build utils)))
3256 (snippet
3257 '(begin
3258 ;; Drop bundled library.
3259 (delete-file-recursively "libevent")
3260 #t))))
3261 (arguments
3262 `(#:configure-flags
3263 (list
3264 "--with-privsep-user=nobody"
3265 "--with-privsep-group=nogroup"
3266 "--localstatedir=/var"
3267 "--enable-pie"
3268 "--without-embedded-libevent"
3269 (string-append "--with-systemdsystemunitdir="
3270 (assoc-ref %outputs "out")
3271 "/lib/systemd/system"))))
3272 (build-system gnu-build-system)
3273 (inputs
3274 `(("libevent" ,libevent)
3275 ("libxml2" ,libxml2)
3276 ("openssl" ,openssl)
3277 ("readline" ,readline)))
3278 (native-inputs
3279 `(("pkg-config" ,pkg-config)))
3280 (home-page "https://vincentbernat.github.io/lldpd/")
3281 (synopsis "Locate neighbors of your network equipment")
3282 (description
3283 "The @dfn{Link Layer Discovery Protocol} (LLDP) is an industry standard
3284 protocol designed to supplant proprietary Link-Layer protocols such as EDP or
3285 CDP. The goal of LLDP is to provide an inter-vendor compatible mechanism to
3286 deliver Link-Layer notifications to adjacent network devices. @code{lldpd} is
3287 an implementation of LLDP. It also supports some proprietary protocols.")
3288 (license license:isc)))
3289
3290 (define-public hashcash
3291 (package
3292 (name "hashcash")
3293 (version "1.22")
3294 (source
3295 (origin
3296 (method url-fetch)
3297 (uri (string-append "http://www.hashcash.org/source/hashcash-"
3298 version ".tgz"))
3299 (sha256
3300 (base32
3301 "15kqaimwb2y8wvzpn73021bvay9mz1gqqfc40gk4hj6f84nz34h1"))))
3302 (build-system gnu-build-system)
3303 (arguments
3304 `(#:make-flags (list (string-append "CC=" ,(cc-for-target)))
3305 #:phases
3306 (modify-phases %standard-phases
3307 (delete 'configure)
3308 ;; No tests available.
3309 (delete 'check)
3310 (replace 'install
3311 (lambda* (#:key outputs #:allow-other-keys)
3312 (let* ((outdir (assoc-ref outputs "out"))
3313 (bindir (string-append outdir "/bin"))
3314 (mandir (string-append outdir "/share/man/man1"))
3315 (docdir (string-append outdir "/share/doc/hashcash-" ,version)))
3316 ;; Install manually, as we don't need the `sha1' binary
3317 (install-file "hashcash" bindir)
3318 (install-file "hashcash.1" mandir)
3319 (install-file "README" docdir)
3320 (install-file "LICENSE" docdir)
3321 (install-file "CHANGELOG" docdir)
3322 #t))))))
3323 (home-page "https://www.hashcash.org/")
3324 (synopsis "Denial-of-service countermeasure")
3325 (description "Hashcash is a proof-of-work algorithm, which has been used
3326 as a denial-of-service countermeasure technique in a number of systems.
3327
3328 A hashcash stamp constitutes a proof-of-work which takes a parametrizable
3329 amount of work to compute for the sender. The recipient can verify received
3330 hashcash stamps efficiently.
3331
3332 This package contains a command-line tool for computing and verifying hashcash
3333 stamps.")
3334 (license license:public-domain)))