gnu: nyxt (formerly 'next'): Update to 20200702.
[jackhill/guix/guix.git] / gnu / packages / networking.scm
CommitLineData
f6d9b3de 1;;; GNU Guix --- Functional package management for GNU
5f645557 2;;; Copyright © 2014, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
dcaa1561 3;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
a2b2aebe 4;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
61253c4f 5;;; Copyright © 2015, 2016, 2017 Stefan Reichör <stefan@xsteve.at>
95146623 6;;; Copyright © 2016 Raimon Grau <raimonster@gmail.com>
a1da1dee 7;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
42ff54d5 8;;; Copyright © 2016 John Darrington <jmd@gnu.org>
7536321e 9;;; Copyright © 2016, 2017, 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
d85b398b 10;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
3c986a7d 11;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
2913a942 12;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
b747718e 13;;; Copyright © 2016 Benz Schenk <benz.schenk@uzh.ch>
38510546 14;;; Copyright © 2016, 2017 Pjotr Prins <pjotr.guix@thebird.nl>
3cd501c8 15;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
cc24bf98 16;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
2ff17f06 17;;; Copyright © 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
3c85058c 18;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
dbf87ecb 19;;; Copyright © 2017, 2019 Gábor Boskovits <boskovits@gmail.com>
167a541f 20;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
5f645557 21;;; Copyright © 2018 Adam Van Ymeren <adam@vany.ca>
1170198d 22;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
d282fee5 23;;; Copyright © 2018 Tonton <tonton@riseup.net>
a234ae38 24;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
f6c87714 25;;; Copyright © 2018 Theodoros Foradis <theodoros@foradis.org>
a92a93c9 26;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
8daa8326 27;;; Copyright © 2018, 2020 Oleg Pykhalov <go.wigust@gmail.com>
4715f92e 28;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
523533ed 29;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
2e8c912f 30;;; Copyright © 2019 Vasile Dumitrascu <va511e@yahoo.com>
ac629e62 31;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
a83e2a01 32;;; Copyright © 2019 Timotej Lazar <timotej.lazar@araneo.si>
b72c22c0 33;;; Copyright © 2019 Brice Waegeneire <brice@waegenei.re>
b080b6d9 34;;; Copyright © 2019 Tonton <tonton@riseup.net>
54cf5e2a 35;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
a363978c 36;;; Copyright © 2019, 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
ad54d6c9 37;;; Copyright © 2019 Daniel Schaefer <git@danielschaefer.me>
a0993c29 38;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
b51863d2 39;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
96945cab 40;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
ef6d3b64 41;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
f6d9b3de
LC
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
8a413bca 58(define-module (gnu packages networking)
f6d9b3de
LC
59 #:use-module ((guix licenses) #:prefix license:)
60 #:use-module (guix packages)
61 #:use-module (guix download)
491f7fc0 62 #:use-module (guix git-download)
167a541f 63 #:use-module (guix build-system cmake)
834a2fc1 64 #:use-module (guix build-system glib-or-gtk)
f6d9b3de 65 #:use-module (guix build-system gnu)
523533ed 66 #:use-module (guix build-system go)
065cb27a 67 #:use-module (guix build-system meson)
af5faef9 68 #:use-module (guix build-system perl)
9e6c7c42 69 #:use-module (guix build-system python)
ad54d6c9 70 #:use-module (guix build-system trivial)
96945cab 71 #:use-module (guix utils)
8d60dd71 72 #:use-module (gnu packages)
834a2fc1
NG
73 #:use-module (gnu packages admin)
74 #:use-module (gnu packages adns)
82ee141b 75 #:use-module (gnu packages algebra)
834a2fc1 76 #:use-module (gnu packages audio)
c5a9b16d 77 #:use-module (gnu packages autogen)
de5308f5 78 #:use-module (gnu packages autotools)
5f645557 79 #:use-module (gnu packages base)
834a2fc1 80 #:use-module (gnu packages bison)
d597dda6 81 #:use-module (gnu packages boost)
998afc36 82 #:use-module (gnu packages check)
4fb5f830 83 #:use-module (gnu packages code)
834a2fc1 84 #:use-module (gnu packages compression)
13d79b64 85 #:use-module (gnu packages cpp)
1170198d 86 #:use-module (gnu packages crypto)
9e6c7c42 87 #:use-module (gnu packages curl)
baf45671 88 #:use-module (gnu packages cyrus-sasl)
c2700e78 89 #:use-module (gnu packages dejagnu)
065cb27a 90 #:use-module (gnu packages docbook)
de5308f5 91 #:use-module (gnu packages documentation)
834a2fc1 92 #:use-module (gnu packages flex)
729cfbdd 93 #:use-module (gnu packages freedesktop)
82ee141b 94 #:use-module (gnu packages gettext)
961012a0 95 #:use-module (gnu packages glib)
167a541f 96 #:use-module (gnu packages gnome)
834a2fc1
NG
97 #:use-module (gnu packages gnupg)
98 #:use-module (gnu packages gtk)
1170198d 99 #:use-module (gnu packages image)
dcaa1561 100 #:use-module (gnu packages libevent)
9c798f90 101 #:use-module (gnu packages libidn)
834a2fc1
NG
102 #:use-module (gnu packages linux)
103 #:use-module (gnu packages lua)
5f645557 104 #:use-module (gnu packages multiprecision)
89e34644 105 #:use-module (gnu packages kerberos)
834a2fc1 106 #:use-module (gnu packages ncurses)
e0fa6413 107 #:use-module (gnu packages nettle)
baf45671 108 #:use-module (gnu packages openldap)
e0fa6413 109 #:use-module (gnu packages password-utils)
d85b398b 110 #:use-module (gnu packages pcre)
834a2fc1 111 #:use-module (gnu packages perl)
5ccde207 112 #:use-module (gnu packages perl-check)
998afc36 113 #:use-module (gnu packages pkg-config)
31831489 114 #:use-module (gnu packages polkit)
13d79b64 115 #:use-module (gnu packages pretty-print)
31831489 116 #:use-module (gnu packages pulseaudio)
834a2fc1 117 #:use-module (gnu packages python)
a68b4514 118 #:use-module (gnu packages python-web)
44d10b1f 119 #:use-module (gnu packages python-xyz)
d016b60f 120 #:use-module (gnu packages qt)
c2700e78 121 #:use-module (gnu packages readline)
c5a9b16d 122 #:use-module (gnu packages samba)
e0fa6413 123 #:use-module (gnu packages serialization)
cd0322a3 124 #:use-module (gnu packages sqlite)
d016b60f 125 #:use-module (gnu packages ssh)
4fb5f830
TGR
126 #:use-module (gnu packages textutils)
127 #:use-module (gnu packages tls)
af5faef9 128 #:use-module (gnu packages valgrind)
dbf87ecb 129 #:use-module (gnu packages web)
1170198d 130 #:use-module (gnu packages wxwidgets)
b3623b6f 131 #:use-module (gnu packages xml)
af5faef9 132 #:use-module (ice-9 match))
f6d9b3de 133
31831489
RG
134(define-public blueman
135 (package
136 (name "blueman")
c5a9b16d 137 (version "2.1.3")
31831489
RG
138 (source
139 (origin
27ced656
MB
140 (method url-fetch)
141 (uri (string-append "https://github.com/blueman-project/blueman/releases"
142 "/download/" version "/blueman-" version ".tar.xz"))
31831489 143 (sha256
27ced656 144 (base32 "1pngqbwapbvywhkmflapqvs0wa0af7d1a87wy56l5hg2r462xl1v"))))
31831489
RG
145 (build-system glib-or-gtk-build-system)
146 (arguments
c5a9b16d 147 `(#:configure-flags (list "--enable-polkit"
c5a9b16d
RG
148 "--without-systemdsystemunitdir" ; Not required
149 "--without-systemduserunitdir") ; Not required
150 #:phases
151 (modify-phases %standard-phases
c5a9b16d
RG
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))))))
31831489 216 (native-inputs
27ced656 217 `(("cython" ,python-cython)
31831489 218 ("glib:bin" ,glib "bin")
c5a9b16d 219 ("gobject-introspection" ,gobject-introspection)
31831489
RG
220 ("gtk+:bin" ,gtk+ "bin")
221 ("intltool" ,intltool)
31831489
RG
222 ("pkg-config" ,pkg-config)))
223 (inputs
c5a9b16d 224 `(("bluez" ,bluez)
31831489 225 ("dbus" ,dbus)
c5a9b16d 226 ("gdkpixbuf" ,gdk-pixbuf+svg)
31831489
RG
227 ("glib" ,glib)
228 ("gtk+" ,gtk+)
229 ("iproute2" ,iproute)
c5a9b16d 230 ("iptables" ,iptables)
31831489
RG
231 ("net-tools" ,net-tools)
232 ("pango" ,pango)
233 ("polkit" ,polkit)
c5a9b16d 234 ("ppp" ,ppp)
31831489
RG
235 ("pulseaudio" ,pulseaudio)
236 ("pycairo" ,python-pycairo)
237 ("pygobject" ,python-pygobject)
238 ("python" ,python-wrapper)
729cfbdd 239 ("libappindicator" ,libappindicator)
c5a9b16d 240 ("libnm" ,network-manager)))
31831489
RG
241 (synopsis "GTK+ Bluetooth manager")
242 (description "Blueman is a Bluetooth management utility using the Bluez
243D-Bus backend. It is designed to be easy to use for most common Bluetooth
244tasks.")
245 (home-page "https://github.com/blueman-project/blueman")
246 (license license:gpl3+)))
247
f3fda298
TGR
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.
c791efde
JD
252(define-public macchanger
253 (package
254 (name "macchanger")
f3fda298
TGR
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"))))
c791efde 264 (build-system gnu-build-system)
6fd52309 265 (home-page "https://www.gnu.org/software/macchanger/")
a3947cb1 266 (synopsis "Viewing and manipulating MAC addresses of network interfaces")
c791efde
JD
267 (description "GNU MAC Changer is a utility for viewing and changing MAC
268addresses of networking devices. New addresses may be set explicitly or
269randomly. They can include MAC addresses of the same or other hardware vendors
38510546 270or, more generally, MAC addresses of the same category of hardware.")
c791efde
JD
271 (license license:gpl2+)))
272
1e61e22f
TUBK
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"
366c1cbb
MW
293 (("^TESTS = .*") "TESTS = \n"))
294 #t)))))
d7d2b1dc 295 (home-page "https://www.remlab.net/miredo/")
1e61e22f
TUBK
296 (synopsis "Teredo IPv6 tunneling software")
297 (description
298 "Miredo is an implementation (client, relay, server) of the Teredo
299specification, which provides IPv6 Internet connectivity to IPv6 enabled hosts
300residing in IPv4-only networks, even when they are behind a NAT device.")
301 (license license:gpl2+)))
302
54bbed96
MB
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.
319It 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
3162d11e
MB
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)
372proxy ARP bridging. Unlike standard bridging, proxy ARP bridging can bridge
373Ethernet networks behind wireless nodes. Normal layer@tie{}2 bridging does
374not work between wireless nodes because wireless does not know about MAC
375addresses used in the wired Ethernet networks. This daemon can also be
376useful for making transparent firewalls.")
377 (license license:gpl2)))
378
f6d9b3de
LC
379(define-public socat
380 (package
381 (name "socat")
e1926802 382 (version "1.7.3.4")
f6d9b3de
LC
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
e1926802 390 "1z7xgnwiqpcv1j6aghhj9nqbx7cg3gpc4n9j7vi9hm7nhv5788wp"))))
f6d9b3de 391 (build-system gnu-build-system)
e1926802 392 (arguments '(#:tests? #f)) ; no test suite
f6d9b3de
LC
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
399data channels---files, pipes, devices, sockets, etc. It can create
400\"listening\" sockets, named pipes, and pseudo terminals.
401
402socat can be used, for instance, as TCP port forwarder, as a shell interface
403to UNIX sockets, IPv6 relay, for redirecting TCP oriented programs to a serial
404line, to logically connect serial lines on different computers, or to
405establish a relatively secure environment (su and chroot) for running client
e881752c 406or server shell scripts with network connections.")
f6d9b3de 407 (license license:gpl2)))
603090d8 408
c4947d0e
JD
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
434libwrap.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!
366c1cbb 442 (invoke "make" "REAL_DAEMON_DIR=/etc" "linux")))
c4947d0e
JD
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/")))
366c1cbb
MW
477 bins))
478 #t)))))
c4947d0e
JD
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
482network services. It includes a library which may be used by daemons to
483transparently 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
603090d8
RW
488(define-public zeromq
489 (package
490 (name "zeromq")
5d1f5b30 491 (version "4.3.2")
603090d8
RW
492 (source (origin
493 (method url-fetch)
5d1f5b30
MB
494 (uri (string-append "https://github.com/zeromq/libzmq/releases"
495 "/download/v" version "/zeromq-" version ".tar.gz"))
603090d8
RW
496 (sha256
497 (base32
5d1f5b30 498 "0qzp80ky4y2k7k1ya09v9gkivvfbz2km813snrb8jhnn634bbmzb"))))
603090d8 499 (build-system gnu-build-system)
5fbba846 500 (home-page "https://zeromq.org")
603090d8
RW
501 (synopsis "Library for message-based applications")
502 (description
503 "The 0MQ lightweight messaging kernel is a library which extends the
504standard socket interfaces with features traditionally provided by specialized
505messaging middle-ware products. 0MQ sockets provide an abstraction of
506asynchronous message queues, multiple messaging patterns, message
507filtering (subscriptions), seamless access to multiple transport protocols and
508more.")
509 (license license:lgpl3+)))
a2b2aebe 510
433dc746
CB
511(define-public czmq
512 (package
513 (name "czmq")
f02ab17b 514 (version "4.2.0")
433dc746
CB
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
f02ab17b 523 "1szciz62sk3fm4ga9qjpxz0n0lazvphm32km95bq92ncng12kayg"))))
433dc746
CB
524 (build-system gnu-build-system)
525 (arguments
f02ab17b
MB
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)))))
433dc746
CB
536 (inputs
537 `(("zeromq" ,zeromq)))
9fc6a24c 538 (home-page "https://zeromq.org")
433dc746
CB
539 (synopsis "High-level C bindings for ØMQ")
540 (description
541 "czmq provides bindings for the ØMQ core API that hides the differences
542between different versions of ØMQ.")
543 (license license:mpl2.0)))
544
f6c87714 545(define-public cppzmq
a92a93c9
MB
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)))
316928ad 569 (home-page "https://zeromq.org")
a92a93c9
MB
570 (synopsis "C++ bindings for the ØMQ messaging library")
571 (description
572 "This package provides header-only C++ bindings for ØMQ. The header
f6c87714 573files contain direct mappings of the abstractions provided by the ØMQ C API.")
a92a93c9 574 (license license:expat)))
f6c87714 575
a363978c
JW
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
607the Network Address Translation - Port Mapping Protocol (NAT-PMP)
608written in the C programming language.")
609 (license license:bsd-3)))
610
2c1286f4
SB
611(define-public librdkafka
612 (package
613 (name "librdkafka")
7277baf5 614 (version "1.4.2")
2c1286f4 615 (source (origin
7277baf5
KCB
616 (method git-fetch)
617 (uri (git-reference
618 (url "https://github.com/edenhill/librdkafka.git")
619 (commit (string-append "v" version))))
620 (file-name (git-file-name name version))
2c1286f4
SB
621 (sha256
622 (base32
7277baf5 623 "05mgrdzacn9kdpr68r5j0cvsvl54s52glnsc1ww9rcxx6p7hq1ly"))))
2c1286f4
SB
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"))
366c1cbb
MW
635 (invoke "./configure"
636 (string-append "--prefix=" out))))))))
2c1286f4
SB
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,
645containing both Producer and Consumer support.")
646 (license license:bsd-2)))
647
a2b2aebe
MW
648(define-public libndp
649 (package
650 (name "libndp")
9526d861 651 (version "1.7")
a2b2aebe
MW
652 (source (origin
653 (method url-fetch)
5ebab403
TGR
654 (uri (string-append "https://libndp.org/files/"
655 "libndp-" version ".tar.gz"))
a2b2aebe
MW
656 (sha256
657 (base32
9526d861 658 "1dlinhl39va00v55qygjc9ap77yqf7xvn4rwmvdr49xhzzxhlj1c"))))
a2b2aebe 659 (build-system gnu-build-system)
5ebab403 660 (home-page "https://libndp.org/")
a2b2aebe
MW
661 (synopsis "Library for Neighbor Discovery Protocol")
662 (description
663 "libndp contains a library which provides a wrapper for IPv6 Neighbor
664Discovery Protocol. It also provides a tool named ndptool for sending and
665receiving NDP messages.")
666 (license license:lgpl2.1+)))
5df2316d
MW
667
668(define-public ethtool
669 (package
670 (name "ethtool")
75d493ae 671 (version "5.7")
5df2316d
MW
672 (source (origin
673 (method url-fetch)
674 (uri (string-append "mirror://kernel.org/software/network/"
956a14b4 675 "ethtool/ethtool-" version ".tar.xz"))
5df2316d
MW
676 (sha256
677 (base32
75d493ae 678 "0f9w0pqkvwn540rasmj6c8897g9gj2hmjnbkhpi9yf1s7jyvhkkj"))))
5df2316d 679 (build-system gnu-build-system)
1d8d90a8
TGR
680 (native-inputs
681 `(("pkg-config" ,pkg-config)))
682 (inputs
683 `(("libmnl" ,libmnl)))
5df2316d
MW
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,
688auto-negotiation and checksum offload on many network devices, especially
689Ethernet devices.")
690 (license license:gpl2)))
24a848c8
SR
691
692(define-public ifstatus
693 (package
694 (name "ifstatus")
695 (version "1.1.0")
696 (source (origin
697 (method url-fetch)
de67e922
LF
698 (uri (string-append "mirror://sourceforge/ifstatus/ifstatus/"
699 "ifstatus%20v" version "/ifstatus-v"
24a848c8
SR
700 version ".tar.gz"))
701 (sha256
702 (base32
703 "045cbsq9ps32j24v8y5hpyqxnqn9mpaf3mgvirlhgpqyb9jsia0c"))
704 (modules '((guix build utils)))
705 (snippet
6cbee49d
MW
706 '(begin
707 (substitute* "Main.h"
708 (("#include <stdio.h>")
709 "#include <stdio.h>\n#include <stdlib.h>"))
710 #t))))
24a848c8
SR
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"
366c1cbb
MW
723 (string-append bin "/ifstatus")))
724 #t)))))
24a848c8
SR
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
8874f766 730needed/wanted real-time traffic statistics of multiple network
24a848c8
SR
731interfaces, with a simple and efficient view on the command line. It is
732intended as a substitute for the PPPStatus and EthStatus projects.")
8874f766 733 (license license:gpl2+)))
95146623 734
065cb27a
MB
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
781configuration, troubleshooting, or servers. Utilities included are:
782
783@itemize @bullet
784@item @command{arping}: Ping hosts using the @dfn{Adress Resolution Protocol}.
785@item @command{clockdiff}: Compute time difference between network hosts
786using 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
789and 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
792the 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
795discover 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
95146623
RG
805(define-public nload
806 (package
807 (name "nload")
808 (version "0.7.4")
809 (source (origin
810 (method url-fetch)
de67e922
LF
811 (uri (string-append "mirror://sourceforge/nload/nload/" version
812 "/nload-" version ".tar.gz"))
95146623
RG
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
822bandwidth usage in real time. It visualizes the in- and outgoing traffic using
d1e4ad1b 823two graphs, and provides additional info like total amount of transferred data
95146623
RG
824and min/max network usage.")
825 (license license:gpl2+)))
998afc36
TGR
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)
60880ac5
TGR
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=[^ ]* ")
366c1cbb
MW
848 (string-append (assoc-ref inputs "net-tools") "/bin/")))
849 #t))
998afc36 850 (add-before 'check 'delete-failing-tests
60880ac5 851 ;; Avoid https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802105.
998afc36
TGR
852 (lambda _
853 (substitute* "tests/common.c"
854 (("tcase_add_test\\(tc, \
855test_parse_format_ipv(4(|_listen_all|_mapped_ipv6)|6)\\);")
366c1cbb
MW
856 ""))
857 #t)))
998afc36
TGR
858 #:make-flags (list "CC=gcc"
859 (string-append "prefix=" (assoc-ref %outputs "out")))
860 #:test-target "test"))
60880ac5
TGR
861 (inputs `(("net-tools" ,net-tools)
862 ("zlib" ,zlib)))
998afc36
TGR
863 (native-inputs `(("check" ,check)
864 ("pkg-config" ,pkg-config)))
450a1af2 865 (home-page "https://code.kryo.se/iodine/")
998afc36
TGR
866 (synopsis "Tunnel IPv4 data through a DNS server")
867 (description "Iodine tunnels IPv4 data through a DNS server. This
868can be useful in different situations where internet access is firewalled, but
869DNS queries are allowed. The bandwidth is asymmetrical, with limited upstream
870and up to 1 Mbit/s downstream.")
871 ;; src/md5.[ch] is released under the zlib license
872 (license (list license:isc license:zlib))))
834a2fc1 873
9c798f90 874(define-public whois
875 (package
876 (name "whois")
efd9742b 877 (version "5.5.6")
9c798f90 878 (source
879 (origin
880 (method url-fetch)
881 (uri (string-append "mirror://debian/pool/main/w/whois/"
cc08576d 882 "whois_" version ".tar.xz"))
9c798f90 883 (sha256
efd9742b 884 (base32 "0kpi981zjczvdcxfcq455c529vlaxa73x8kbm530z5b01h0fk8fb"))))
9c798f90 885 (build-system gnu-build-system)
9c798f90 886 (arguments
5ac1143d 887 `(#:tests? #f ; no test suite
9c798f90 888 #:make-flags (list "CC=gcc"
889 (string-append "prefix=" (assoc-ref %outputs "out")))
890 #:phases
891 (modify-phases %standard-phases
5ac1143d 892 (delete 'configure) ; no configure script
9c798f90 893 (add-before 'build 'setenv
894 (lambda _
895 (setenv "HAVE_ICONV" "1")
268b3802 896 #t)))))
9c798f90 897 (inputs
6ce76bdc 898 `(("libidn2" ,libidn2)))
9c798f90 899 (native-inputs
7c90d0f4 900 `(("gettext" ,gettext-minimal)
eb6263f2
MB
901 ("perl" ,perl)
902 ("pkg-config" ,pkg-config)))
5ac1143d
TGR
903 (synopsis "Intelligent client for the WHOIS directory service")
904 (description
905 "whois searches for an object in a @dfn{WHOIS} (RFC 3912) database.
906It is commonly used to look up the registered users or assignees of an Internet
907resource, such as a domain name, an IP address block, or an autonomous system.
908It can automatically select the appropriate server for most queries.
909
910For historical reasons, this package also includes @command{mkpasswd}, which
911encrypts passwords using @code{crypt(3)} and is unrelated to the Expect command
912of the same name.")
9c798f90 913 (home-page "https://github.com/rfc1036/whois")
914 (license license:gpl2+)))
915
834a2fc1
NG
916(define-public wireshark
917 (package
918 (name "wireshark")
dba255c0 919 (version "3.2.5")
834a2fc1
NG
920 (source
921 (origin
922 (method url-fetch)
923 (uri (string-append "https://www.wireshark.org/download/src/wireshark-"
d016b60f 924 version ".tar.xz"))
834a2fc1 925 (sha256
dba255c0 926 (base32 "0h69m9maq6w5gik4gamv4kfqrr37hmi4kpwh225y1k36awm0b2dx"))))
2b6ab17f 927 (build-system cmake-build-system)
834a2fc1 928 (arguments
2b6ab17f 929 `(#:phases
a234ae38 930 (modify-phases %standard-phases
2b6ab17f
NG
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.
a234ae38 934 (lambda _
2b6ab17f
NG
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)))
d016b60f 978 (synopsis "Network traffic analyzer")
834a2fc1
NG
979 (description "Wireshark is a network protocol analyzer, or @dfn{packet
980sniffer}, that lets you capture and interactively browse the contents of
981network frames.")
d016b60f
NG
982 (home-page "https://www.wireshark.org/")
983 (license license:gpl2+)))
82ee141b 984
61253c4f
SR
985(define-public fping
986 (package
987 (name "fping")
bc9c3dc3 988 (version "4.2")
61253c4f
SR
989 (source
990 (origin
991 (method url-fetch)
992 (uri (string-append "https://fping.org/dist/fping-"
993 version ".tar.gz"))
994 (sha256
bc9c3dc3 995 (base32 "0jmnf4vmr43aiwk3h2b5qdsb95gxar8gz1yli8fswnm9nrs9ccvx"))))
61253c4f 996 (build-system gnu-build-system)
25706b8f 997 (home-page "https://fping.org/")
61253c4f
SR
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
1001Protocol (ICMP) echo request to determine if a target host is responding.
1002fping differs from ping in that you can specify any number of targets on the
1003command line, or specify a file containing the lists of targets to ping.
1004Instead of sending to one target until it times out or replies, fping will
1005send out a ping packet and move on to the next target in a round-robin
1006fashion.")
1007 (license license:expat)))
1008
a68b4514
TGR
1009(define-public gandi.cli
1010 (package
1011 (name "gandi.cli")
55c08305 1012 (version "1.5")
a68b4514
TGR
1013 (source
1014 (origin
1015 (method url-fetch)
1016 (uri (pypi-uri name version))
1017 (sha256
55c08305 1018 (base32 "110wc9zgxsrvw4yzp21p0ian5lcf7vhcpxhnmsc4fg9pzl2bwxd5"))))
a68b4514
TGR
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,
1054manage, and delete Internet resources from Gandi.net such as domain names,
1055virtual machines, and certificates.")
1056 (license license:gpl3+)))
1057
03981f90
MC
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.git")
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
1080handling network namespaces in Go.")
1081 (license license:asl2.0))))
1082
523533ed
MC
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.git")
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
1105transmission protocol (SCTP) in a Go application.")
1106 (license license:asl2.0))))
1107
82ee141b
TGR
1108(define-public httping
1109 (package
1110 (name "httping")
2f968727 1111 (version "2.5")
82ee141b
TGR
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
2f968727 1119 "1y7sbgkhgadmd93x1zafqc4yp26ssiv16ni5bbi9vmvvdl55m29y"))))
82ee141b
TGR
1120 (build-system gnu-build-system)
1121 (native-inputs
b94a6ca0 1122 `(("gettext" ,gettext-minimal)))
82ee141b
TGR
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
1136HTTP(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
1138by firewalls or when you want to monitor the response time of the actual web
1139application stack itself.")
1140 (license license:gpl2))) ; with permission to link with OpenSSL
68b14f2e 1141
9e6c7c42
SR
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")
366c1cbb
MW
1164 "/bin/curl')")))
1165 #t)))))
9e6c7c42
SR
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
1171prints timing information for each step of the HTTP request (DNS lookup,
1172TCP connection, TLS handshake and so on) in the terminal.")
1173 (license license:expat)))
1174
baf45671
VL
1175(define-public squid
1176 (package
1177 (name "squid")
78d473aa 1178 (version "4.12")
baf45671
VL
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
78d473aa 1185 (base32 "05z34ysy2zn7as11vd365xxhh36bm1ysiwcbr0i0f0nwng406apl"))))
baf45671
VL
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,
1211FTP, and more. It reduces bandwidth and improves response times by caching and
1212reusing frequently-requested web pages.")
1213 (home-page "http://www.squid-cache.org/")
1214 (license license:gpl2+)))
1215
be9f3a83
AI
1216(define-public bwm-ng
1217 (package
1218 (name "bwm-ng")
01d7cafe 1219 (version "0.6.2")
be9f3a83
AI
1220 (source
1221 (origin
01d7cafe
TGR
1222 (method git-fetch)
1223 (uri (git-reference
1224 (url "https://github.com/vgropp/bwm-ng.git")
1225 (commit (string-append "v" version))))
1226 (file-name (git-file-name name version))
be9f3a83 1227 (sha256
01d7cafe 1228 (base32 "0k906wb4pw3dcqpcwnni78lahzi3bva483f8c17sjykic7as4y5n"))))
be9f3a83 1229 (build-system gnu-build-system)
01d7cafe
TGR
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)))
be9f3a83
AI
1244 (synopsis "Console based live network and disk I/O bandwidth monitor")
1245 (description "Bandwidth Monitor NG is a small and simple console based
1246live network and disk I/O bandwidth monitor.")
1247 (home-page "https://www.gropp.org/?id=projects&sub=bwm-ng")
1248 (license license:gpl2)))
1249
d85b398b
EB
1250(define-public aircrack-ng
1251 (package
1252 (name "aircrack-ng")
bfa368ed 1253 (version "1.6")
d85b398b
EB
1254 (source
1255 (origin
1256 (method url-fetch)
6930ea33 1257 (uri (string-append "https://download.aircrack-ng.org/aircrack-ng-"
d85b398b
EB
1258 version ".tar.gz"))
1259 (sha256
bfa368ed 1260 (base32 "0ix2k64qg7x3w0bzdsbk1m50kcpq1ws59g3zkwiafvpwdr4gs2sg"))))
d85b398b
EB
1261 (build-system gnu-build-system)
1262 (native-inputs
b9114ccb
TGR
1263 `(("autoconf" ,autoconf)
1264 ("automake" ,automake)
1265 ("libtool" ,libtool)
1266 ("pkg-config" ,pkg-config)
1267 ("which" ,which)))
d85b398b
EB
1268 (inputs
1269 `(("libgcrypt" ,libgcrypt)
1270 ("libnl" ,libnl)
b9114ccb 1271 ("libpcap" ,libpcap)
d85b398b
EB
1272 ("ethtool" ,ethtool)
1273 ("pcre" ,pcre)
1274 ("sqlite" ,sqlite)
1275 ("zlib" ,zlib)))
1276 (arguments
b9114ccb
TGR
1277 `(#:configure-flags
1278 (list "--with-experimental=yes" ; build wesside-ng, etc.
1279 "--with-gcrypt") ; openssl's the default
d85b398b 1280 #:phases (modify-phases %standard-phases
b9114ccb
TGR
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))
d85b398b
EB
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"
b9114ccb
TGR
1294 (("ethtool ")
1295 (string-append ethtool " ")))
d85b398b 1296 #t))))))
6930ea33 1297 (home-page "https://www.aircrack-ng.org")
d85b398b
EB
1298 (synopsis "Assess WiFi network security")
1299 (description
1300 "Aircrack-ng is a complete suite of tools to assess WiFi network
1301security. It focuses on different areas of WiFi security: monitoring,
1302attacking, testing, and cracking. All tools are command-line driven, which
1303allows for heavy scripting.")
1304 (license (list license:gpl2+ license:bsd-3))))
1305
a83e2a01
TL
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
1330force the Wi-Fi Protected Setup (WPS) PIN by exploiting the low or
1331non-existing entropy of some access points.")
1332 (license license:gpl3+)))
5094da0b
TL
1333
1334(define-public reaver
1335 (package
1336 (name "reaver")
70c910eb 1337 (version "1.6.6")
5094da0b
TL
1338 (source (origin
1339 (method url-fetch)
1340 (uri (string-append
1341 "https://github.com/t6x/reaver-wps-fork-t6x/releases/"
70c910eb 1342 "download/v" version "/reaver-" version ".tar.xz"))
5094da0b
TL
1343 (sha256
1344 (base32
70c910eb 1345 "00k7mc81ifv0wma7k4v18mj498badbw5yls6c28qin3d1gda0ag3"))))
5094da0b
TL
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))))
70c910eb 1368 #:tests? #f)) ; there are no tests
5094da0b
TL
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
1377point's Wi-Fi Protected Setup (WPS) PIN. Once the PIN is found, the WPA
1378passphrase can be recovered and the AP's wireless settings can be
1379reconfigured.")
1380 (license license:gpl2+)))
d85b398b 1381
49cb1cf9
SB
1382(define-public perl-danga-socket
1383 (package
1384 (name "perl-danga-socket")
d4c9543f 1385 (version "1.62")
49cb1cf9
SB
1386 (source
1387 (origin
1388 (method url-fetch)
d4c9543f 1389 (uri (string-append "mirror://cpan/authors/id/N/NM/NML/"
49cb1cf9
SB
1390 "Danga-Socket-" version ".tar.gz"))
1391 (sha256
d4c9543f 1392 (base32 "0x4bvirmf0kphks19jwgva00zz73zx344218dfaiv8gigrw3yg4m"))))
49cb1cf9 1393 (build-system perl-build-system)
d4c9543f
TGR
1394 (native-inputs
1395 `(("perl-test-tcp" ,perl-test-tcp)))
49cb1cf9
SB
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
1402which provides the basic framework for event-driven asynchronous IO, designed
1403to be fast. Danga::Socket is both a base class for objects, and an event
1404loop.")
1405 (license license:perl-license)))
1406
c7727a8b
TGR
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
1428validate and untaint their input. This includes both basic validation
1429(@code{is_ipv4()} and @code{is_ipv6()}) and special cases like checking whether
1430an address belongs to a specific network or whether an address is public or
1431private (reserved).")
1432 (license license:perl-license)))
1433
68b14f2e
DM
1434(define-public perl-net-dns
1435 (package
1436 (name "perl-net-dns")
6810e9fe 1437 (version "1.24")
68b14f2e
DM
1438 (source
1439 (origin
1440 (method url-fetch)
8faa9df7
TGR
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")))
68b14f2e 1447 (sha256
6810e9fe 1448 (base32 "0qyy5k4k0llqjjmkkfg96919gqybdc1z5fy9047n9imidjxc59hi"))))
68b14f2e
DM
1449 (build-system perl-build-system)
1450 (inputs
1451 `(("perl-digest-hmac" ,perl-digest-hmac)))
8faa9df7 1452 (home-page "https://www.net-dns.org/")
68b14f2e
DM
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)))
87b14091
DM
1457
1458(define-public perl-socket6
1459 (package
1460 (name "perl-socket6")
538b71a9 1461 (version "0.29")
87b14091
DM
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
538b71a9 1471 "054izici8klfxs8hr5rljib28plijpsfymy99xbzdp047bx1b2a6"))))
87b14091
DM
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"))
366c1cbb 1483 (apply invoke "perl" args)))))))
9aba9b12 1484 (home-page "https://metacpan.org/release/Socket6")
87b14091
DM
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
1488definitions and structure manipulators for Perl.")
1489 (license license:bsd-3)))
8d60dd71
DM
1490
1491(define-public perl-net-dns-resolver-programmable
1492 (package
1493 (name "perl-net-dns-resolver-programmable")
1a6d0d8c 1494 (version "0.003")
8d60dd71
DM
1495 (source
1496 (origin
1497 (method url-fetch)
1498 (uri (string-append
1499 "mirror://cpan/authors/id/J/JM/JMEHNLE/net-dns-resolver-programmable/"
1a6d0d8c 1500 "Net-DNS-Resolver-Programmable-v" version ".tar.gz"))
8d60dd71
DM
1501 (sha256
1502 (base32
1503 "1v3nl2kaj4fs55n1617n53q8sa3mir06898vpy1rq98zjih24h4d"))
1504 (patches
1d248adb 1505 (search-patches "perl-net-dns-resolver-programmable-fix.patch"))))
8d60dd71
DM
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
9aba9b12 1511 "https://metacpan.org/release/Net-DNS-Resolver-Programmable")
8d60dd71
DM
1512 (synopsis
1513 "Programmable DNS resolver class for offline emulation of DNS")
1514 (description "Net::DNS::Resolver::Programmable is a programmable DNS resolver for
1515offline emulation of DNS.")
2f3108ad 1516 (license license:perl-license)))
1201eab9 1517
ac629e62
JL
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)
ce3a71c6 1531 (inputs
ac629e62
JL
1532 `(("perl-net-dns" ,perl-net-dns)))
1533 (home-page "https://metacpan.org/release/Net-DNS-Resolver-Mock")
858be794
TGR
1534 (synopsis "Mock DNS Resolver object for testing")
1535 (description
1536 "Net::DNS::Resolver::Mock is a subclass of Net::DNS::Resolver, but returns
1537static data from any provided DNS zone file instead of querying the network.
1538It is intended primarily for use in testing.")
ac629e62
JL
1539 (license license:perl-license)))
1540
1201eab9
DM
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"))
366c1cbb 1566 (apply invoke "perl" args)))))))
1201eab9 1567 (home-page
9aba9b12 1568 "https://metacpan.org/release/NetAddr-IP")
1201eab9
DM
1569 (synopsis
1570 "Manages IPv4 and IPv6 addresses and subnets")
1571 (description "NetAddr::IP manages IPv4 and IPv6 addresses and subsets.")
2f3108ad 1572 (license license:perl-license)))
3ed361ea
DM
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)
2ff17f06
EF
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)))))
3ed361ea
DM
1597 (inputs
1598 `(("perl-net-cidr-lite" ,perl-net-cidr-lite)
1599 ("perl-socket6" ,perl-socket6)))
1600 (home-page
9aba9b12 1601 "https://metacpan.org/release/Net-Patricia")
3ed361ea
DM
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))))
b09a8b6f
DM
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
9aba9b12 1626 "https://metacpan.org/release/Net-CIDR-Lite")
b09a8b6f
DM
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+)))
e741c4e4
DM
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")
b2799117 1637 (version "1.51")
e741c4e4
DM
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
b2799117 1647 "1fka8fr7fw6sh3xa9glhs1zjg3s2gfkhi7n7da1l2m2wblqj0c0n"))))
e741c4e4 1648 (build-system perl-build-system)
9aba9b12 1649 (home-page "https://metacpan.org/release/Geo-IP")
e741c4e4
DM
1650 (synopsis
1651 "Look up location and network information by IP Address in Perl")
36a4366d
EF
1652 (description "The Perl module @code{Geo::IP}. It looks up location and
1653network information by IP Address.")
2f3108ad 1654 (license license:perl-license)))
e818f321
DM
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
9aba9b12 1679 "https://metacpan.org/release/IO-Socket-INET6")
e818f321
DM
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
1683sockets in Perl.")
2f3108ad 1684 (license license:perl-license)))
a1c83fef 1685
167a541f
TD
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)
5ba17819 1703 ("zlib" ,zlib)))
167a541f
TD
1704 (arguments
1705 `(#:phases
1706 (modify-phases %standard-phases
1707 (replace 'check
1708 (lambda _
366c1cbb 1709 (invoke "ctest" "-E" "url-test"))))))
167a541f
TD
1710 (synopsis "Library providing automatic proxy configuration management")
1711 (description "Libproxy handles the details of HTTP/HTTPS proxy
1712configuration for applications across all scenarios. Applications using
1713libproxy only have to specify which proxy to use.")
1714 (home-page "https://libproxy.github.io/libproxy")
1715 (license license:lgpl2.1+)))
1716
a1c83fef 1717(define-public proxychains-ng
1718 (package
1719 (name "proxychains-ng")
223ef546 1720 (version "4.14")
a0b5c998
TGR
1721 (source
1722 (origin
1723 (method url-fetch)
1724 (uri (string-append "http://ftp.barfooze.de/pub/sabotage/tarballs/"
110387f8 1725 "proxychains-ng-" version ".tar.xz"))
a0b5c998 1726 (sha256
223ef546 1727 (base32 "1bmhfbl1bzc87vl0xwr1wh5xvslfyc41nl2hqzhbj258p0sy004x"))))
a1c83fef 1728 (build-system gnu-build-system)
1729 (arguments
223ef546 1730 `(#:tests? #f ; there are no tests
a1c83fef 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)))
a0b5c998
TGR
1741 #t))
1742 (add-before 'configure 'set-up-environment
1743 (lambda _
1744 (setenv "CC" "gcc")
a1c83fef 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
1748in dynamically linked programs and redirects them through one or more SOCKS or
1749HTTP proxies.")
1750 (home-page "https://github.com/rofl0r/proxychains-ng")
1751 (license license:gpl2+)))
93666cf7 1752
1753(define-public enet
1754 (package
1755 (name "enet")
26fd58f2 1756 (version "1.3.15")
93666cf7 1757 (source (origin
1758 (method url-fetch)
1759 (uri (string-append "http://enet.bespin.org/download/"
9aed8a1e 1760 "enet-" version ".tar.gz"))
93666cf7 1761 (sha256
1762 (base32
26fd58f2 1763 "1yxxf9bkx6dx3j8j70fj17c05likyfibb1419ls74hp58qrzdgas"))))
93666cf7 1764 (build-system gnu-build-system)
1765 (native-inputs
1766 `(("pkg-config" ,pkg-config)))
3b990922 1767 (synopsis "Network communication layer on top of UDP")
93666cf7 1768 (description
1769 "ENet's purpose is to provide a relatively thin, simple and robust network
1770communication layer on top of UDP. The primary feature it provides is optional
1771reliable, in-order delivery of packets. ENet omits certain higher level
1772networking features such as authentication, server discovery, encryption, or
1773other similar tasks that are particularly application specific so that the
1774library remains flexible, portable, and easily embeddable.")
1775 (home-page "http://enet.bespin.org")
1776 (license license:expat)))
4fb5f830
TGR
1777
1778(define-public sslh
1779 (package
1780 (name "sslh")
2fe29c84 1781 (version "1.20")
925926ba
TGR
1782 (source
1783 (origin
1784 (method git-fetch)
1785 (uri (git-reference
1786 (url "https://github.com/yrutschle/sslh.git")
1787 (commit (string-append "v" version))))
1788 (file-name (git-file-name name version))
1789 (sha256
2fe29c84 1790 (base32 "18zhkqlwfh6f5dg1a41a4p7p9g94dgb9nwls1ksy9r5yz174i2fx"))))
4fb5f830
TGR
1791 (build-system gnu-build-system)
1792 (native-inputs
7eaa37a1 1793 `(;; Test dependencies.
4fb5f830
TGR
1794 ("lcov" ,lcov)
1795 ("perl" ,perl)
2fe29c84 1796 ("perl-conf-libconfig" ,perl-conf-libconfig)
4fb5f830
TGR
1797 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
1798 ("perl-socket6" ,perl-socket6)
2fe29c84 1799 ("psmisc" ,psmisc))) ; for ‘killall’
4fb5f830
TGR
1800 (inputs
1801 `(("libcap" ,libcap)
1802 ("libconfig" ,libconfig)
7eaa37a1 1803 ("pcre" ,pcre)
4fb5f830
TGR
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
2fe29c84
TGR
1810 (lambda _
1811 (substitute* "./t"
1812 (("\"/tmp") "$ENV{\"TMPDIR\"} . \"")
1813 ;; The Guix build environment lacks ‘ip6-localhost’.
1814 (("ip6-localhost") "localhost"))
1815 #t))
4fb5f830
TGR
1816 ;; Many of these files are mentioned in the man page. Install them.
1817 (add-after 'install 'install-documentation
2fe29c84
TGR
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)))
4fb5f830
TGR
1828 #:make-flags (list "CC=gcc"
1829 "USELIBCAP=1"
1830 "USELIBWRAP=1"
1831 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1832 #:test-target "test"))
7eaa37a1 1833 (home-page "https://www.rutschle.net/tech/sslh/README.html")
4fb5f830
TGR
1834 (synopsis "Applicative network protocol demultiplexer")
1835 (description
1836 "sslh is a network protocol demultiplexer. It acts like a switchboard,
1837accepting connections from clients on one port and forwarding them to different
1838servers based on the contents of the first received data packet. Detection of
1839common protocols like HTTP(S), SSL, SSH, OpenVPN, tinc, and XMPP is already
1840implemented, but any other protocol that matches a regular expression can be
1841added. sslh's name comes from its original application of serving both SSH and
1842HTTPS on port 443, allowing SSH connections from inside corporate firewalls
1843that block port 22.")
1844 (license (list license:bsd-2 ; tls.[ch]
1845 license:gpl2+)))) ; everything else
b747718e
BS
1846
1847(define-public iperf
1848 (package
1849 (name "iperf")
8daa8326 1850 (version "3.7")
b747718e
BS
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
8daa8326 1857 "033is7b5grfbiil98jxlz4ixp9shm44x6hy8flpsyz1i4h108inq"))))
b747718e
BS
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
1862supports tuning of various parameters related to timing, buffers and
1863protocols (TCP, UDP, SCTP with IPv4 and IPv6). For each test it reports
1864the bandwidth, loss, and other parameters.")
1bcf4ba4 1865 (home-page "https://software.es.net/iperf/")
b747718e
BS
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
b7f3cf2c
AI
1870
1871(define-public nethogs
1872 (package
1873 (name "nethogs")
dd070af5 1874 (version "0.8.6")
52dd58b5
TGR
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))))
3102e8d3 1881 (hash
dc36bfec
TGR
1882 (content-hash
1883 (base32 "0sn1sdp86akwlm4r1vmkxjjl50c0xaisk91bbz57z7kcsaphxna9")
1884 sha256))
52dd58b5 1885 (file-name (git-file-name name version))))
b7f3cf2c
AI
1886 (build-system gnu-build-system)
1887 (inputs
1888 `(("libpcap" ,libpcap)
1889 ("ncurses" ,ncurses)))
1890 (arguments
1891 `(#:make-flags `("CC=gcc"
52dd58b5
TGR
1892 ,(string-append "PREFIX=" %output)
1893 ,(string-append "VERSION=" ,version))
b7f3cf2c
AI
1894 #:phases
1895 (modify-phases %standard-phases
dd070af5 1896 (delete 'configure)))) ; no ./configure script.
b7f3cf2c
AI
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
1900breaking the traffic down per protocol or per subnet, like most tools do, it
1901groups bandwidth by process.
1902
1903NetHogs does not rely on a special kernel module to be loaded. If there's
1904suddenly a lot of network traffic, you can fire up NetHogs and immediately see
1905which PID is causing this. This makes it easy to identify programs that have
1906gone wild and are suddenly taking up your bandwidth.")
1907 (license license:gpl2+)))
92ac2cff 1908
b3623b6f
RH
1909(define-public nzbget
1910 (package
1911 (name "nzbget")
39a20acc 1912 (version "21.0")
b3623b6f
RH
1913 (source
1914 (origin
1915 (method url-fetch)
59bcda1e
EF
1916 (uri (string-append "https://github.com/nzbget/nzbget/releases"
1917 "/download/v" version
1918 "/nzbget-" version "-src.tar.gz"))
b3623b6f
RH
1919 (sha256
1920 (base32
59bcda1e 1921 "0lwd0pfrs4a5ms193hgz2qiyf7grrc925dw6y0nfc0gkp27db9b5"))
657f1815
TGR
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))))
b3623b6f
RH
1930 (arguments
1931 `(#:configure-flags
1932 (list
657f1815
TGR
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")
b3623b6f
RH
1937 (string-append "--with-tlslib=GnuTLS"))))
1938 (build-system gnu-build-system)
c695fb76
TGR
1939 (inputs `(("gnutls" ,gnutls)
1940 ("libxml2" ,libxml2)
1941 ("ncurses" ,ncurses)
1942 ("zlib" ,zlib)))
1943 (native-inputs `(("pkg-config" ,pkg-config)))
b3623b6f
RH
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
1948on information given in @code{nzb} files. NZBGet can be used in standalone
1949and in server/client modes. In standalone mode, you pass NZBGet @command{nzb}
1950files as command-line parameters and it downloads them and exits. NZBGet also
1951contains a Web interface. Its server can be controlled through remote
1952procedure calls (RPCs).")
1953 (license license:gpl2+)))
1954
92ac2cff
SB
1955(define-public openvswitch
1956 (package
1957 (name "openvswitch")
e4e9a1bc 1958 (version "2.13.0")
92ac2cff
SB
1959 (source (origin
1960 (method url-fetch)
1961 (uri (string-append
034db237 1962 "https://www.openvswitch.org/releases/openvswitch-"
92ac2cff
SB
1963 version ".tar.gz"))
1964 (sha256
1965 (base32
e4e9a1bc 1966 "0cd5vmfr6zwgcnkwys6rag6cmz68v0librpaplianv734xs74pyx"))))
92ac2cff
SB
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 _
366c1cbb
MW
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"))))))
92ac2cff
SB
1990 (native-inputs
1991 `(("perl" ,perl)
1992 ("pkg-config" ,pkg-config)
e4e9a1bc 1993 ("python" ,python-wrapper)
92ac2cff
SB
1994 ;; for testing
1995 ("util-linux" ,util-linux)))
92ac2cff
SB
1996 (inputs
1997 `(("libcap-ng" ,libcap-ng)
1998 ("openssl" ,openssl)))
1999 (synopsis "Virtual network switch")
034db237 2000 (home-page "https://www.openvswitch.org/")
92ac2cff
SB
2001 (description
2002 "Open vSwitch is a multilayer virtual switch. It is designed to enable
2003massive network automation through programmatic extension, while still
2004supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
2005IPFIX, 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
38510546 2011
42c939a8
RW
2012(define-public python-ipy
2013 (package
2014 (name "python-ipy")
47982ca9 2015 (version "1.00")
42c939a8
RW
2016 (source (origin
2017 (method url-fetch)
2018 (uri (pypi-uri "IPy" version))
2019 (sha256
2020 (base32
47982ca9 2021 "08d6kcacj67mvh0b6y765ipccy6gi4w2ndd4v1l3im2qm1cgcarg"))))
42c939a8
RW
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
2026handling for most notations in use for IPv4 and IPv6 addresses and
2027networks.")
2028 (license license:bsd-3)))
2029
a4e7215d
DM
2030(define-public python2-ipy
2031 (package-with-python2 python-ipy))
2032
38510546
PP
2033(define-public speedtest-cli
2034 (package
2035 (name "speedtest-cli")
d8a079e2 2036 (version "2.1.2")
38510546
PP
2037 (source
2038 (origin
b3740474
EF
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))
38510546 2044 (sha256
d8a079e2 2045 (base32 "1456yly6iym2c9bl6pi4sz8xbw34bm2dxm1vzpydsd6jazwpmy26"))))
38510546
PP
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
2051speedtest.net.")
2052 (license license:asl2.0)))
5b5cf3c7
GB
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
2071added and bugs fixed. The source includes readline support but it is not
2072enabled due to license conflicts between the BSD advertising clause and the GPL.")
9bd0f415 2073 (home-page "https://git.kernel.org/cgit/network/tftp/tftp-hpa.git/about/")
5b5cf3c7
GB
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))))
cc24bf98 2078
f2e12718 2079(define-public pidentd
2080 (package
2081 (name "pidentd")
2082 (version "3.0.19")
2083 (source
2084 (origin
6562a388
EF
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))
f2e12718 2090 (sha256
2091 (base32
6562a388 2092 "1k4rr0b4ygxssbnsykzjvz4hjhazzz4j5arlilyc1iq7b1wzsk7i"))))
f2e12718 2093 (build-system gnu-build-system)
2094 (arguments
2095 `(#:tests? #f)) ; No tests are included
2096 (inputs
3401526f 2097 `(("openssl" ,openssl-1.0))) ;for the DES library
f2e12718 2098 (home-page "https://www.lysator.liu.se/~pen/pidentd/")
2099 (synopsis "Small Ident Daemon")
2100 (description
6562a388 2101 "@dfn{Pidentd} (Peter's Ident Daemon) is an identd, which implements a
f2e12718 2102identification server. Pidentd looks up specific TCP/IP connections and
2103returns the user name and other information about the connection.")
2104 (license license:public-domain)))
2105
cc24bf98
LF
2106(define-public spiped
2107 (package
2108 (name "spiped")
5dd8cb2e 2109 (version "1.6.1")
cc24bf98
LF
2110 (source (origin
2111 (method url-fetch)
2112 (uri (string-append "https://www.tarsnap.com/spiped/spiped-"
2113 version ".tgz"))
2114 (sha256
2115 (base32
5dd8cb2e 2116 "04rpnc53whfky7pp2m9h35gwzwn6788pnl6c1qd576mpknbqjw4d"))))
cc24bf98
LF
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
2150symmetrically encrypted and authenticated pipes between socket addresses, so
2151that one may connect to one address (e.g., a UNIX socket on localhost) and
2152transparently have a connection established to another address (e.g., a UNIX
2153socket on a different system). This is similar to 'ssh -L' functionality, but
2154does not use SSH and requires a pre-shared symmetric key.")
2155 (license license:bsd-2)))
c2700e78
GB
2156
2157(define-public quagga
2158 (package
2159 (name "quagga")
75377c6c 2160 (version "1.2.4")
c2700e78
GB
2161 (source (origin
2162 (method url-fetch)
2163 (uri (string-append "mirror://savannah/quagga/quagga-"
2164 version ".tar.gz"))
2165 (sha256
2166 (base32
75377c6c 2167 "1lsksqxij5f1llqn86pkygrf5672kvrqn1kvxghi169hqf1c0r73"))
c2700e78
GB
2168 (patches
2169 (search-patches "quagga-reproducible-build.patch"))))
2170 (build-system gnu-build-system)
c695fb76
TGR
2171 (native-inputs `(("pkg-config" ,pkg-config)
2172 ("perl" ,perl)
2173 ("dejagnu" ,dejagnu)))
2174 (inputs `(("readline" ,readline)
2175 ("c-ares" ,c-ares)))
c2700e78
GB
2176 (synopsis "Routing Software Suite")
2177 (description "Quagga is a routing software suite, providing implementations
2178of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for Unix platforms.
2179
2180The Quagga architecture consists of a core daemon, @command{zebra}, which
2181acts as an abstraction layer to the underlying Unix kernel and presents the
2182Zserv API over a Unix or TCP stream to Quagga clients. It is these Zserv
2183clients which typically implement a routing protocol and communicate routing
2184updates to the zebra daemon.")
340978d7 2185 (home-page "https://www.nongnu.org/quagga/")
c2700e78 2186 (license license:gpl2+)))
4d9d9e3f
LF
2187
2188(define-public thc-ipv6
491f7fc0
LF
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.git")
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
4d9d9e3f
LF
2230for researching IPv6 implementations and deployments. It requires Linux 2.6 or
2231newer and only works on Ethernet network interfaces.")
491f7fc0
LF
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))))
cfd6a3b1
AI
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
2257networking-related statistics and prepare them visually in a human-friendly
2258way. It features various output methods including an interactive curses user
2259interface 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))))
de5308f5
RW
2267
2268(define-public libnet
2269 (package
2270 (name "libnet")
41cb2382 2271 (version "1.2")
3c85058c
RH
2272 (source
2273 (origin
41cb2382
MB
2274 (method url-fetch)
2275 (uri (string-append "https://github.com/libnet/libnet/releases/download"
2276 "/v" version "/libnet-" version ".tar.gz"))
3c85058c
RH
2277 (sha256
2278 (base32
41cb2382 2279 "19ys9vxk6fg70yzzdxsphfr0rwzgxxhr9b3ykhpg7rfray0qd96a"))))
de5308f5
RW
2280 (build-system gnu-build-system)
2281 (arguments
2282 `(#:phases
2283 (modify-phases %standard-phases
de5308f5
RW
2284 (add-before 'build 'build-doc
2285 (lambda* (#:key make-flags #:allow-other-keys)
366c1cbb
MW
2286 (apply invoke "make" "-C" "doc" "doc"
2287 make-flags))))))
de5308f5 2288 (native-inputs
41cb2382
MB
2289 `(;; To build the documentation, Doxygen and Perl is required.
2290 ("doxygen" ,doxygen)
2291 ("perl" ,perl)))
cce6b764 2292 (home-page "https://github.com/libnet/libnet")
de5308f5
RW
2293 (synopsis "Framework for low-level network packet construction")
2294 (description
2295 "Libnet provides a fairly portable framework for network packet
2296construction and injection. It features portable packet creation interfaces
2297at the IP layer and link layer, as well as a host of supplementary
2298functionality. Using libnet, quick and simple packet assembly applications
2299can be whipped up with little effort.")
2300 (license license:bsd-2)))
b59a8fd4
TGR
2301
2302(define-public mtr
2303 (package
2304 (name "mtr")
a36eba47 2305 (version "0.93")
b59a8fd4
TGR
2306 (source
2307 (origin
2308 (method url-fetch)
3f80d7ce
TGR
2309 (uri (string-append "ftp://ftp.bitwizard.nl/mtr/"
2310 "mtr-" version ".tar.gz"))
b59a8fd4 2311 (sha256
a36eba47 2312 (base32 "03gid8g4r6a9r40855s4345xm1bylj2kfqkicjwxpmvvccyng712"))))
b59a8fd4
TGR
2313 (build-system gnu-build-system)
2314 (inputs
2315 `(("libcap" ,libcap)
2316 ("ncurses" ,ncurses)))
b59a8fd4
TGR
2317 (arguments
2318 `(#:tests? #f)) ; tests require network access
2319 (home-page "https://www.bitwizard.nl/mtr/")
2320 (synopsis "Network diagnostic tool")
2321 (description
30954e61 2322 "@acronym{mtr, My TraceRoute} combines the functionality of the
b59a8fd4 2323@command{traceroute} and @command{ping} programs in a single network diagnostic
63f5656c
TGR
2324tool. @command{mtr} can use several network protocols to detect intermediate
2325routers (or @dfn{hops}) between the local host and a user-specified destination.
2326It then continually measures the response time and packet loss at each hop, and
b59a8fd4
TGR
2327displays the results in real time.")
2328 (license license:gpl2+)))
5f645557
AVY
2329
2330(define-public strongswan
2331 (package
2332 (name "strongswan")
d9b9989a 2333 (version "5.8.4")
5f645557
AVY
2334 (source
2335 (origin
2336 (method url-fetch)
2337 (uri (string-append "https://download.strongswan.org/strongswan-"
2338 version ".tar.bz2"))
2339 (sha256
d9b9989a 2340 (base32 "0g2m08gmgdi3qvvqz6zy7n16np53sp232xd0rdc2vdhk73img6id"))))
5f645557
AVY
2341 (build-system gnu-build-system)
2342 (arguments
2343 `(#:phases
2344 (modify-phases %standard-phases
58246f96 2345 (add-before 'build 'patch-command-file-names
5f645557 2346 (lambda* (#:key inputs #:allow-other-keys)
5f645557
AVY
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")))
58246f96
TGR
2355 #t))
2356 (add-before 'check 'set-up-test-environment
2357 (lambda* (#:key inputs #:allow-other-keys)
5f645557
AVY
2358 (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
2359 "/share/zoneinfo"))
2360 #t)))
2361 #:configure-flags
2362 (list
08dd5f67 2363 ;; Disable bsd-4 licensed plugins.
5f645557
AVY
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)
1bab7340 2373 ("tzdata" ,tzdata-for-tests)))
5f645557
AVY
2374 (synopsis "IKEv1/v2 keying daemon")
2375 (description "StrongSwan is an IPsec implementation originally based upon
2376the FreeS/WAN project. It contains support for IKEv1, IKEv2, MOBIKE, IPv6,
2377NAT-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
2395file 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))))
1170198d 2407
2408(define-public amule
2409 (package
2410 (name "amule")
2411 (version "2.3.2")
2412 (source (origin
d25a4876
EF
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))
1170198d 2418 (sha256
2419 (base32
d25a4876 2420 "010wxm6g9f92x6fympj501zbnjka32rzbx0sk3a2y4zpih5d2nsn"))
1170198d 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
fc1ed8c1 2427 (delete 'bootstrap) ; bootstrap phase runs too early.
1170198d 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)
de99ba7e 2457 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
1170198d 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
2462file sharing networks. It includes a graphical user interface (GUI), a daemon
2463allowing you to run a client with no graphical interface, and a Web GUI for
2464remote access. The @command{amulecmd} command allows you to control aMule
2465remotely.")
2466 (license license:gpl2+)))
d282fee5
T
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
2486networks 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)))
f1656a59
DM
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.git")
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
a34dfa24 2522 (delete 'bootstrap)
f1656a59
DM
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
2534eight 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))))
d597dda6
NG
2540
2541(define-public asio
2542 (package
2543 (name "asio")
9d391ccd 2544 (version "1.12.2")
d597dda6
NG
2545 (source
2546 (origin
cb9da5d1
TGR
2547 (method url-fetch)
2548 (uri (string-append "mirror://sourceforge/asio/asio/"
74a3ce30 2549 version " (Stable)/asio-" version ".tar.bz2"))
d597dda6 2550 (sha256
9d391ccd 2551 (base32 "1akray4l3hgahmb92sbvsqg128c7g7s92jrkf1sp1fjnfjrxq9sf"))))
d597dda6 2552 (build-system gnu-build-system)
d597dda6
NG
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"))
cb9da5d1 2560 (string-append "--with-openssl=" (assoc-ref %build-inputs "openssl")))))
d597dda6
NG
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
2564low-level I/O programming that provides developers with a consistent
2565asynchronous model using a modern C++ approach.")
2566 (license license:boost1.0)))
0017e55f 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
2591Features:
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))))
a8253fbe
RW
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")
b5d1286f
OP
2628 "--with-logfile=/var/log/snmpd.log"
2629 (string-append "--with-openssl="
2630 (assoc-ref %build-inputs "openssl")))
a8253fbe
RW
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
2669widely used protocol for monitoring the health and welfare of network
2670equipment (e.g. routers), computer equipment and even devices like UPSs.
2671Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and
2672SNMP v3 using both IPv4 and IPv6.")
66687960
EF
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"))))
a8253fbe
RW
2676 (license (list license:bsd-3
2677 (license:non-copyleft
2678 "http://www.net-snmp.org/about/license.html"
2679 "CMU/UCD copyright notice")))))
277f25ce
OP
2680
2681(define-public ubridge
2682 (package
2683 (name "ubridge")
1b0e3795 2684 (version "0.9.18")
5af7428b
TGR
2685 (source
2686 (origin
2687 (method git-fetch)
2688 (uri (git-reference
2689 (url "https://github.com/GNS3/ubridge.git")
2690 (commit (string-append "v" version))))
2691 (file-name (git-file-name name version))
2692 (sha256
1b0e3795 2693 (base32 "0jg66jhhpv4c9340fsdp64hf9h253i8r81fknxa0gq241ripp3jn"))))
277f25ce
OP
2694 (build-system gnu-build-system)
2695 (arguments
5af7428b 2696 `(#:tests? #f ; no tests
24f4fc84
TGR
2697 #:make-flags
2698 (list ,(string-append "CC=" (cc-for-target)))
277f25ce
OP
2699 #:phases
2700 (modify-phases %standard-phases
5af7428b 2701 (delete 'configure) ; no configure script
277f25ce
OP
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
2716between various technologies. Currently, bridging between UDP tunnels,
2717Ethernet and TAP interfaces is supported. Packet capture is also supported.")
2718 (license license:gpl3+)))
5bd3134e
PN
2719
2720(define-public hcxtools
03c443ce
TGR
2721 (package
2722 (name "hcxtools")
28553e17 2723 (version "5.2.0")
03c443ce
TGR
2724 (source
2725 (origin
2726 (method git-fetch)
2727 (uri (git-reference
2728 (url "https://github.com/ZerBea/hcxtools.git")
2729 (commit version)))
2730 (sha256
28553e17 2731 (base32 "0k2qlq9hz5zc21nyc6yrnfqzga7hydn5mm0x3rpl2fhkwl81lxcn"))
03c443ce
TGR
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
d2774867 2746 (delete 'configure))))
03c443ce
TGR
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
5bd3134e 2751packets from wireless devices for use with hashcat or John the Ripper.")
03c443ce 2752 (license license:expat)))
a87ee0e4
PN
2753
2754(define-public hcxdumptool
4f7db085
TGR
2755 (package
2756 (name "hcxdumptool")
6aec7e2e 2757 (version "6.0.6")
4f7db085
TGR
2758 (source
2759 (origin
2760 (method git-fetch)
2761 (uri (git-reference
2762 (url "https://github.com/ZerBea/hcxdumptool.git")
2763 (commit version)))
2764 (sha256
6aec7e2e 2765 (base32 "1b4d543y64ib92w9gcmiyjn5hz2vyjqmxk3f3yr1zk04fhw16gmf"))
4f7db085
TGR
2766 (file-name (git-file-name name version))))
2767 (build-system gnu-build-system)
2768 (arguments
2769 `(#:make-flags
39a598c6 2770 (list ,(string-append "CC=" (cc-for-target))
4f7db085
TGR
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))))
6aec7e2e
TGR
2776 (inputs
2777 `(("openssl" ,openssl)))
4f7db085
TGR
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,
a87ee0e4
PN
2782upload the \"uncleaned\" cap to @url{https://wpa-sec.stanev.org/?submit} to
2783see if the access point or the client is vulnerable to a dictionary attack.
2784Convert the cap file to hccapx format and/or to WPA-PMKID-PBKDF2
2785hashline (16800) with @command{hcxpcaptool} from the @code{hcxtools} package
2786and check if the WLAN key or the master key was transmitted unencrypted.")
4f7db085 2787 (license license:expat)))
2913a942
AI
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)
7789bf95
SB
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")))
2913a942
AI
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
2810be installed on a machine with access to an external TCP/IP network and will
2811allow all other machines, without direct access to that network, to be relayed
2812through the machine the Dante server is running on. The external network will
2813never see any machines other than the one Dante is running on.")
2814 (license (license:non-copyleft "file://LICENSE"))))
362fba83
PN
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
2864model for building applications that require seamless and secure
2865communication over HTTP.")
2866 (home-page "https://github.com/Corvusoft/restbed")
2867 (license license:agpl3+))))
e0fa6413 2868
13d79b64
PN
2869(define-public restinio
2870 (package
2871 (name "restinio")
798335cf 2872 (version "0.6.1.1")
13d79b64
PN
2873 (source (origin
2874 (method git-fetch)
2875 (uri (git-reference
2876 (url "https://github.com/Stiffstream/restinio.git")
2877 (commit (string-append "v." version))))
2878 (file-name (git-file-name name version))
2879 (sha256
2880 (base32
798335cf 2881 "141a96hx8zhcdv121g6cs91n46kb47y040v25pnvz5f54964z7f5"))))
13d79b64
PN
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)
71ce0b52 2893 ("fmt" ,fmt)
13d79b64
PN
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
2907HTTP/Websocket server. It is based on standalone version of ASIO
2908and targeted primarily for asynchronous processing of HTTP-requests.")
2909 (license license:bsd-3)))
2910
e0fa6413
PN
2911(define-public opendht
2912 (package
2913 (name "opendht")
218ec70a 2914 (version "2.0.0")
e0fa6413
PN
2915 (source (origin
2916 (method git-fetch)
2917 (uri (git-reference
2918 (url "https://github.com/savoirfairelinux/opendht.git")
2919 (commit version)))
2920 (file-name (git-file-name name version))
2921 (sha256
2922 (base32
218ec70a 2923 "1q1fwk8wwk9r6bp0indpr60ql668lsk16ykslacyhrh7kg97kvhr"))))
4fe8a9f2
JW
2924 ;; Since 2.0, the gnu-build-system does not seem to work anymore, upstream bug?
2925 (build-system cmake-build-system)
e0fa6413
PN
2926 (inputs
2927 `(("gnutls" ,gnutls)
2928 ("nettle" ,nettle)
2929 ("readline" ,readline)
e0fa6413 2930 ("jsoncpp" ,jsoncpp)
4fe8a9f2 2931 ("openssl" ,openssl)
71ce0b52 2932 ("fmt" ,fmt)))
e0fa6413 2933 (propagated-inputs
4fe8a9f2 2934 `(("argon2" ,argon2) ; TODO: Needed for the pkg-config .pc file to work?
1ac0c1b8 2935 ("msgpack" ,msgpack))) ;included in several installed headers
e0fa6413
PN
2936 (native-inputs
2937 `(("autoconf" ,autoconf)
2938 ("pkg-config" ,pkg-config)
4fe8a9f2 2939 ("restinio" ,restinio)
e0fa6413 2940 ("automake" ,automake)
4fe8a9f2
JW
2941 ("libtool" ,libtool)
2942 ("cppunit" ,cppunit)))
e0fa6413 2943 (arguments
4fe8a9f2
JW
2944 `(#:tests? #f ; Tests require network connection.
2945 #:configure-flags
2946 '(;; "-DOPENDHT_TESTS=on"
2947 "-DOPENDHT_TOOLS=off"
2948 "-DOPENDHT_PYTHON=off"
2949 "-DOPENDHT_PROXY_SERVER=on"
2950 "-DOPENDHT_PUSH_NOTIFICATIONS=on"
2951 "-DOPENDHT_PROXY_SERVER_IDENTITY=on"
2952 "-DOPENDHT_PROXY_CLIENT=on")))
e0fa6413
PN
2953 (home-page "https://github.com/savoirfairelinux/opendht/")
2954 (synopsis "Distributed Hash Table (DHT) library")
2955 (description "OpenDHT is a Distributed Hash Table (DHT) library. It may
2956be used to manage peer-to-peer network connections as needed for real time
2957communication.")
2958 (license license:gpl3+)))
dbf87ecb
GB
2959
2960(define-public frrouting
2961 (package
2962 (name "frrouting")
2963 (version "6.0.2")
2964 (source (origin
2965 (method url-fetch)
2966 (uri (string-append "https://github.com/FRRouting/frr/releases/"
2967 "download/frr-" version "/frr-" version
2968 ".tar.xz"))
2969 (sha256
2970 (base32
2971 "0xfrvi62w8qlh46f504ka0skb7pm0g0p8vmdng4w90gsbirlzpdd"))))
2972 (build-system gnu-build-system)
2973 (inputs
2974 `(("c-ares" ,c-ares)
2975 ("json-c" ,json-c)
2976 ("readline" ,readline)))
2977 (native-inputs
2978 `(("perl" ,perl)
2979 ("pkg-config" ,pkg-config)
2980 ("python" ,python-wrapper)
2981 ("python-pytest" ,python-pytest)))
2982 (home-page "https://frrouting.org/")
2983 (synopsis "IP routing protocol suite")
2984 (description "FRRouting (FRR) is an IP routing protocol suite which includes
2985protocol daemons for BGP, IS-IS, LDP, OSPF, PIM, and RIP. ")
2986 (license license:gpl2+)))
b72c22c0
BW
2987
2988(define-public iwd
2989 (package
2990 (name "iwd")
2991 (version "0.21")
2992 (source (origin
2993 (method git-fetch)
2994 (uri (git-reference
2995 (url "https://git.kernel.org/pub/scm/network/wireless/iwd.git")
2996 (commit version)))
2997 (file-name (git-file-name name version))
2998 (sha256
2999 (base32
3000 "001dikinsa6kshwscjbvwipavzwpqnpvx9fpshcn63gbvbhyd393"))))
3001 (build-system gnu-build-system)
3002 (inputs
3003 `(("dbus" ,dbus)
b72c22c0
BW
3004 ("ell" ,ell)
3005 ("readline" ,readline)))
3006 (native-inputs
3007 `(("asciidoc" ,asciidoc)
3008 ("autoconf" ,autoconf)
3009 ("automake" ,automake)
5f214c64 3010 ("libtool" ,libtool)
b72c22c0
BW
3011 ("pkgconfig" ,pkg-config)
3012 ("python" ,python)
3013 ("openssl" ,openssl)))
3014 (arguments
3015 `(#:configure-flags
3016 (let ((dbus (assoc-ref %outputs "out")))
3017 (list "--disable-systemd-service"
3018 "--enable-external-ell"
3019 "--enable-hwsim"
3020 "--enable-tools"
3021 "--enable-wired"
3022 "--enable-docs"
3023 "--localstatedir=/var"
3024 (string-append "--with-dbus-datadir=" dbus "/share/")
3025 (string-append "--with-dbus-busdir="
3026 dbus "/share/dbus-1/system-services")))
3027 #:phases
3028 (modify-phases %standard-phases
3029 (add-before 'bootstrap 'pre-bootstrap
3030 (lambda _
3031 (substitute* "Makefile.am"
3032 ;; Test disabled because it needs the kernel module
3033 ;; 'pkcs8_key_parser' loaded.
3034 (("unit\\/test-eapol.*? ") "")
3035 ;; Don't try to 'mkdir /var'.
3036 (("\\$\\(MKDIR_P\\) -m 700") "true"))
3037 #t)))))
3038 (home-page "https://git.kernel.org/pub/scm/network/wireless/iwd.git/")
3039 (synopsis "Internet Wireless Daemon")
3040 (description "iwd is a wireless daemon for Linux that aims to replace WPA
3041Supplicant. It optimizes resource utilization by not depending on any external
3042libraries and instead utilizing features provided by the Linux kernel to the
3043maximum extent possible.")
3044 (license license:lgpl2.1+)))
b080b6d9
T
3045
3046(define-public batctl
3047 (package
3048 (name "batctl")
ba40c10b 3049 (version "2020.1")
b080b6d9
T
3050 (source
3051 (origin
3052 (method url-fetch)
3053 (uri (string-append "https://downloads.open-mesh.org/batman/releases/batman-adv-"
3054 version "/batctl-" version ".tar.gz"))
3055 (sha256
ba40c10b 3056 (base32 "0fy252q1my3a57v6pfz8i97h6zv7v03di01dhwjkj47pqnx1rqm3"))))
b080b6d9
T
3057 (inputs
3058 `(("libnl" ,libnl)))
3059 (native-inputs
3060 `(("pkg-config" ,pkg-config)))
3061 (build-system gnu-build-system)
3062 (arguments
3063 `(#:tests? #f
3064 ;; Batctl only has a makefile. Thus we disable tests and
3065 ;; configuration, passing in a few make-flags.
3066 #:phases (modify-phases %standard-phases (delete 'configure))
3067 #:make-flags
3068 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3069 (string-append "PKG_CONFIG=" (assoc-ref %build-inputs "pkg-config")
3070 "/bin/pkg-config")
3071 "CC=gcc")))
3072 (home-page "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki")
3073 (synopsis "Management tool for the mesh networking BATMAN protocol")
3074 (description "This package provides a control tool for the
3075B.A.T.M.A.N. mesh networking routing protocol provided by the Linux kernel
3076module @code{batman-adv}, for Layer 2.")
3077 (license license:gpl2+)))
079ec547
AG
3078
3079(define-public pagekite
3080 (package
3081 (name "pagekite")
3010035b 3082 (version "1.5.2.200603")
079ec547
AG
3083 (source
3084 (origin
8c655deb
AG
3085 (method git-fetch)
3086 (uri (git-reference
3087 (url "https://github.com/pagekite/PyPagekite.git")
3088 (commit (string-append "v" version))))
3089 (file-name (git-file-name name version))
079ec547 3090 (sha256
3010035b 3091 (base32 "08rcyr54dssnpand6y26f8x9cjmd91hr44my08kxw70s5iqiwizv"))))
079ec547
AG
3092 (build-system python-build-system)
3093 (arguments
8c655deb 3094 `(#:phases
079ec547
AG
3095 (modify-phases %standard-phases
3096 (add-after 'install 'install-man-page
3097 (lambda* (#:key inputs outputs #:allow-other-keys)
3098 (let* ((out (assoc-ref outputs "out"))
3099 (man (string-append out "/share/man")))
3100 (invoke "make"
3101 (string-append "PYTHONPATH=" (getenv "PYTHONPATH"))
3102 "doc/pagekite.1")
3103 (install-file "doc/pagekite.1" (string-append man "/man1"))
3104 #t))))))
3105 (inputs
8c655deb
AG
3106 `(("python-six" ,python-six)
3107 ("python-socksipychain" ,python-socksipychain)))
079ec547
AG
3108 (home-page "https://pagekite.net/")
3109 (synopsis "Make localhost servers publicly visible")
3110 (description
3111 "PageKite implements a tunneled reverse proxy which makes it easy to make
3112a service (such as an HTTP or SSH server) on localhost visible to the wider
3113Internet, even behind NAT or restrictive firewalls. A managed front-end relay
3114service is available at @url{https://pagekite.net/}, or you can run your own.")
3115 (license license:agpl3+)))
ad54d6c9
DS
3116
3117(define-public ipcalc
3118 (package
3119 (name "ipcalc")
3120 (version "0.41")
3121 (source (origin
3122 (method url-fetch)
3123 (uri (string-append "http://jodies.de/ipcalc-archive/"
3124 name "-" version ".tar.gz"))
3125 (sha256
3126 (base32
3127 "12if9sm8h2ac0pgwkw835cgyqjxm6h27k4kfn2vfas9krrqwbafx"))))
3128 (inputs `(("perl" ,perl)
3129 ("tar" ,tar)
3130 ("gzip" ,gzip)
3131 ("tarball" ,source)))
3132 (build-system trivial-build-system) ;no Makefile.PL
3133 (arguments
3134 `(#:modules ((guix build utils))
3135 #:builder
3136 (begin
3137 (use-modules (guix build utils))
3138 (use-modules (srfi srfi-1))
3139 (let* ((source (assoc-ref %build-inputs "source"))
3140 (perl (string-append (assoc-ref %build-inputs "perl")
3141 "/bin"))
3142 (tar (assoc-ref %build-inputs "tar"))
3143 (gz (assoc-ref %build-inputs "gzip"))
3144 (out (assoc-ref %outputs "out"))
3145 (bin (string-append out "/bin"))
3146 (doc (string-append out "/share/doc/ipcalc")))
3147 (setenv "PATH" (string-append gz "/bin"))
3148 (invoke (string-append tar "/bin/tar") "xvf" source)
3149 (chdir (string-append ,name "-" ,version))
3150
3151 (install-file "ipcalc" bin)
3152 (patch-shebang (string-append bin "/ipcalc") (list perl))
3153 #t))))
3154 (synopsis "Simple IP network calculator")
3155 (description "ipcalc takes an IP address and netmask and calculates the
3156resulting broadcast, network, Cisco wildcard mask, and host range. By giving
3157a second netmask, you can design subnets and supernets. It is also intended
3158to be a teaching tool and presents the subnetting results as
3159easy-to-understand binary values.")
3160 (home-page "http://jodies.de/ipcalc")
3161 (license license:gpl2+)))
a0993c29 3162
b51863d2
VL
3163(define-public tunctl
3164 (package
3165 (name "tunctl")
3166 (version "1.5")
3167 (source
3168 (origin
3169 (method url-fetch)
24d9354c 3170 (uri (string-append "mirror://sourceforge/tunctl/tunctl/" version "/"
b51863d2
VL
3171 "tunctl-" version ".tar.gz"))
3172 (sha256
3173 (base32 "1zsgn7w6l2zh2q0j6qaw8wsx981qcr536qlz1lgb3b5zqr66qama"))))
3174 (build-system gnu-build-system)
3175 (arguments
3176 `(#:phases
3177 (modify-phases %standard-phases
3178 (delete 'bootstrap) ;there is no configure.ac file
3179 (delete 'configure) ;there is no configure script
3180 (delete 'check) ;there are no tests
3181 (replace 'build
3182 (lambda _
3183 (setenv "CC" "gcc")
3184 (invoke "make" "tunctl")))
3185 ;; TODO: Requires docbook2x to generate man page from SGML.
3186 (replace 'install
3187 (lambda* (#:key outputs #:allow-other-keys)
3188 (let* ((out (assoc-ref outputs "out"))
3189 (bin (string-append out "/bin")))
3190 (install-file "tunctl" bin))
3191 #t)))))
3192 (home-page "http://tunctl.sourceforge.net")
3193 (synopsis "Utility to set up and maintain TUN/TAP network interfaces")
3194 (description "Tunctl is used to set up and maintain persistent TUN/TAP
3195network interfaces, enabling user applications to simulate network traffic.
3196Such interfaces are useful for VPN software, virtualization, emulation,
3197simulation, and a number of other applications.")
3198 (license license:gpl2)))
3199
62b9ad19
VL
3200(define-public wol
3201 (package
3202 (name "wol")
3203 (version "0.7.1")
3204 (source
3205 (origin
3206 (method url-fetch)
3207 (uri (string-append "mirror://sourceforge/wake-on-lan/wol/"
3208 version "/wol-" version ".tar.gz"))
3209 (sha256
3210 (base32 "08i6l5lr14mh4n3qbmx6kyx7vjqvzdnh3j9yfvgjppqik2dnq270"))))
3211 (build-system gnu-build-system)
3212 (home-page "https://sourceforge.net/projects/wake-on-lan/")
3213 (synopsis "Implements Wake On LAN functionality in a small program")
3214 (description "Tool to send a magic packet to wake another host on the
3215network. This must be enabled on the target host, usually in the BIOS.")
3216 (license license:gpl2)))
3217
a0993c29
DNB
3218(define-public vde2
3219 (package
3220 (name "vde2")
3221 (version "2.3.2")
3222 (source
3223 (origin
3224 (method url-fetch)
3225 (uri "mirror://sourceforge/vde/vde2/2.3.2/vde2-2.3.2.tar.gz")
3226 (sha256
3227 (base32 "14xga0ib6p1wrv3hkl4sa89yzjxv7f1vfqaxsch87j6scdm59pr2"))))
3228 (build-system gnu-build-system)
3229 (arguments
3230 `(#:parallel-build? #f)) ; Build fails if #t.
3231 (inputs
3232 `(("python" ,python)
3233 ("libpcap" ,libpcap)
3234 ("openssl" ,openssl-1.0))) ; Build fails with 1.1.
3235 (home-page "https://github.com/virtualsquare/vde-2")
3236 (synopsis "Virtual Distributed Ethernet")
3237 (description "VDE is a set of programs to provide virtual software-defined
3238Ethernet network interface controllers across multiple virtual or
3239physical, local or remote devices. The VDE architecture provides
3240virtual counterparts to hardware components such as switches and
3241cables.")
3242 (license (list license:gpl2
3243 license:lgpl2.1 ; libvdeplug
3244 (license:non-copyleft ; slirpvde
3245 "file://COPYING.slirpvde"
3246 "See COPYING.slirpvde in the distribution.")))))
96945cab
BW
3247
3248(define-public haproxy
3249 (package
3250 (name "haproxy")
ec3cff2d 3251 (version "2.1.7")
96945cab
BW
3252 (source (origin
3253 (method url-fetch)
3254 (uri (string-append "https://www.haproxy.org/download/"
3255 (version-major+minor version)
3256 "/src/haproxy-" version ".tar.gz"))
3257 (sha256
3258 (base32
ec3cff2d 3259 "0fd3c1znid5a9w3gcf77b85hm2a2558w9s02c4b7xzkmivqnqbir"))))
96945cab
BW
3260 (build-system gnu-build-system)
3261 (arguments
3262 `(#:make-flags
3263 (let* ((out (assoc-ref %outputs "out")))
3264 (list (string-append "PREFIX=" out)
3265 (string-append "DOCDIR=" out "/share/" ,name)
3266 "TARGET=linux-glibc"
3267 "USE_LUA=1"
3268 "USE_OPENSSL=1"
3269 "USE_ZLIB=1"
3270 "USE_PCRE_2=1"))
3271 #:tests? #f ; there are only regression tests, using varnishtest
3272 #:phases
3273 (modify-phases %standard-phases
3274 (delete 'configure))))
3275 (inputs
3276 `(("lua" ,lua)
3277 ("openssl" ,openssl)
3278 ("pcre2" ,pcre2)
3279 ("zlib" ,zlib)))
3280 (home-page "https://www.haproxy.org/")
3281 (synopsis "Reliable, high performance TCP/HTTP load balancer")
3282 (description "HAProxy is a free, very fast and reliable solution offering
3283high availability, load balancing, and proxying for TCP and HTTP-based
3284applications. It is particularly suited for web sites crawling under very
3285high loads while needing persistence or Layer7 processing. Supporting tens of
3286thousands of connections is clearly realistic with today's hardware.")
3287 (license (list license:gpl2+
3288 license:lgpl2.1
3289 license:lgpl2.1+))))
dcaa1561
RW
3290
3291(define-public lldpd
3292 (package
3293 (name "lldpd")
3294 (version "1.0.5")
3295 (source
3296 (origin
3297 (method url-fetch)
3298 (uri (string-append "https://media.luffy.cx/files/lldpd/lldpd-"
3299 version ".tar.gz"))
3300 (sha256
3301 (base32
3302 "16fbqrs3l976gdslx647nds8x7sz4h5h3h4l4yxzrayvyh9b5lrd"))
3303 (modules '((guix build utils)))
3304 (snippet
3305 '(begin
3306 ;; Drop bundled library.
3307 (delete-file-recursively "libevent")
3308 #t))))
3309 (arguments
3310 `(#:configure-flags
3311 (list
3312 "--with-privsep-user=nobody"
3313 "--with-privsep-group=nogroup"
3314 "--localstatedir=/var"
3315 "--enable-pie"
3316 "--without-embedded-libevent"
3317 (string-append "--with-systemdsystemunitdir="
3318 (assoc-ref %outputs "out")
3319 "/lib/systemd/system"))))
3320 (build-system gnu-build-system)
3321 (inputs
3322 `(("libevent" ,libevent)
3323 ("libxml2" ,libxml2)
3324 ("openssl" ,openssl)
3325 ("readline" ,readline)))
3326 (native-inputs
3327 `(("pkg-config" ,pkg-config)))
3328 (home-page "https://vincentbernat.github.io/lldpd/")
3329 (synopsis "Locate neighbors of your network equipment")
3330 (description
3331 "The @dfn{Link Layer Discovery Protocol} (LLDP) is an industry standard
3332protocol designed to supplant proprietary Link-Layer protocols such as EDP or
3333CDP. The goal of LLDP is to provide an inter-vendor compatible mechanism to
3334deliver Link-Layer notifications to adjacent network devices. @code{lldpd} is
3335an implementation of LLDP. It also supports some proprietary protocols.")
3336 (license license:isc)))
ef6d3b64
JK
3337
3338(define-public hashcash
3339 (package
3340 (name "hashcash")
3341 (version "1.22")
3342 (source
3343 (origin
3344 (method url-fetch)
3345 (uri (string-append "http://www.hashcash.org/source/hashcash-"
3346 version ".tgz"))
3347 (sha256
3348 (base32
3349 "15kqaimwb2y8wvzpn73021bvay9mz1gqqfc40gk4hj6f84nz34h1"))))
3350 (build-system gnu-build-system)
3351 (arguments
3352 `(#:make-flags (list (string-append "CC=" ,(cc-for-target)))
3353 #:phases
3354 (modify-phases %standard-phases
3355 (delete 'configure)
3356 ;; No tests available.
3357 (delete 'check)
3358 (replace 'install
3359 (lambda* (#:key outputs #:allow-other-keys)
3360 (let* ((outdir (assoc-ref outputs "out"))
3361 (bindir (string-append outdir "/bin"))
3362 (mandir (string-append outdir "/share/man/man1"))
3363 (docdir (string-append outdir "/share/doc/hashcash-" ,version)))
3364 ;; Install manually, as we don't need the `sha1' binary
3365 (install-file "hashcash" bindir)
3366 (install-file "hashcash.1" mandir)
3367 (install-file "README" docdir)
3368 (install-file "LICENSE" docdir)
3369 (install-file "CHANGELOG" docdir)
3370 #t))))))
3371 (home-page "https://www.hashcash.org/")
3372 (synopsis "Denial-of-service countermeasure")
3373 (description "Hashcash is a proof-of-work algorithm, which has been used
3374as a denial-of-service countermeasure technique in a number of systems.
3375
3376A hashcash stamp constitutes a proof-of-work which takes a parametrizable
3377amount of work to compute for the sender. The recipient can verify received
3378hashcash stamps efficiently.
3379
3380This package contains a command-line tool for computing and verifying hashcash
3381stamps.")
3382 (license license:public-domain)))