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