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