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