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