gnu: czmq: Update to 4.2.1.
[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.1")
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 "0fdclvd7fcwixp0k57ccv7d159v3slasyhvndxfn8n1a9hh0lwjx"))))
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.8")
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 "12lhl2q1pa1qkbv0l1cpy8hn4wh5i99bqc68rlm4f7jyqlj2l82r"))))
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.6")
1458 (source
1459 (origin
1460 (method url-fetch)
1461 (uri (pypi-uri name version))
1462 (sha256
1463 (base32 "1h36jahbp7273wn3yd747kbiwjc0bm3sja67bcxdsd54ln0vyndg"))))
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" ,python-pytest)
1488 ("python-pytest-cov" ,python-pytest-cov)
1489 ("python-tox" ,python-tox)))
1490 (propagated-inputs
1491 `(("openssh" ,openssh))) ; used by gandi/cli/modules/iass.py
1492 (inputs
1493 `(("openssl" ,openssl)
1494 ("python-click" ,python-click)
1495 ("python-ipy" ,python-ipy)
1496 ("python-pyyaml" ,python-pyyaml)
1497 ("python-requests" ,python-requests)))
1498 (home-page "https://cli.gandi.net")
1499 (synopsis "Command-line interface to the Gandi.net Web API")
1500 (description
1501 "This package provides a command-line client (@command{gandi}) to buy,
1502 manage, and delete Internet resources from Gandi.net such as domain names,
1503 virtual machines, and certificates.")
1504 (license license:gpl3+)))
1505
1506 (define-public go-netns
1507 (let ((commit "13995c7128ccc8e51e9a6bd2b551020a27180abd")
1508 (revision "1"))
1509 (package
1510 (name "go-netns")
1511 (version (git-version "0.0.0" revision commit))
1512 (source (origin
1513 (method git-fetch)
1514 (uri (git-reference
1515 (url "https://github.com/vishvananda/netns")
1516 (commit commit)))
1517 (file-name (git-file-name name version))
1518 (sha256
1519 (base32
1520 "1zk6w8158qi4niva5rijchbv9ixgmijsgqshh54wdaav4xrhjshn"))))
1521 (build-system go-build-system)
1522 (arguments
1523 `(#:import-path "github.com/vishvananda/netns"
1524 #:tests? #f)) ;tests require root privileges
1525 (home-page "https://github.com/vishvananda/netns")
1526 (synopsis "Simple network namespace handling for Go")
1527 (description "The netns package provides a simple interface for
1528 handling network namespaces in Go.")
1529 (license license:asl2.0))))
1530
1531 (define-public go-sctp
1532 ;; docker-libnetwork-cmd-proxy requires this exact commit.
1533 ;; This commit is mentioned in docker-libnetwork-cmd-proxy's vendor.conf.
1534 (let ((commit "6e2cb1366111dcf547c13531e3a263a067715847")
1535 (revision "2"))
1536 (package
1537 (name "go-sctp")
1538 (version (git-version "0.0.0" revision commit))
1539 (source (origin
1540 (method git-fetch)
1541 (uri (git-reference
1542 (url "https://github.com/ishidawataru/sctp")
1543 (commit commit)))
1544 (file-name (git-file-name name version))
1545 (sha256
1546 (base32
1547 "1ba90fmpdwxa1ba4hrsjhi3gfy3pwmz7x8amw1p5dc9p5a7nnqrb"))))
1548 (build-system go-build-system)
1549 (arguments
1550 `(#:tests? #f ; Test suite is flakey.
1551 #:import-path "github.com/ishidawataru/sctp"))
1552 (home-page "https://github.com/ishidawataru/sctp")
1553 (synopsis "SCTP library for the Go programming language")
1554 (description "This library provides methods for using the stream control
1555 transmission protocol (SCTP) in a Go application.")
1556 (license license:asl2.0))))
1557
1558 (define-public httping
1559 (package
1560 (name "httping")
1561 (version "2.5")
1562 (source
1563 (origin
1564 (method url-fetch)
1565 (uri (string-append "https://www.vanheusden.com/httping/httping-"
1566 version ".tgz"))
1567 (sha256
1568 (base32
1569 "1y7sbgkhgadmd93x1zafqc4yp26ssiv16ni5bbi9vmvvdl55m29y"))))
1570 (build-system gnu-build-system)
1571 (native-inputs
1572 `(("gettext" ,gettext-minimal)))
1573 (inputs
1574 `(("fftw" ,fftw)
1575 ("ncurses" ,ncurses)
1576 ("openssl" ,openssl)))
1577 (arguments
1578 `(#:make-flags (list "CC=gcc"
1579 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
1580 "PREFIX=")
1581 #:tests? #f)) ; no tests
1582 (home-page "https://www.vanheusden.com/httping/")
1583 (synopsis "Web server latency and throughput monitor")
1584 (description
1585 "httping measures how long it takes to connect to a web server, send an
1586 HTTP(S) request, and receive the reply headers. It is somewhat similar to
1587 @command{ping}, but can be used even in cases where ICMP traffic is blocked
1588 by firewalls or when you want to monitor the response time of the actual web
1589 application stack itself.")
1590 (license license:gpl2))) ; with permission to link with OpenSSL
1591
1592 (define-public httpstat
1593 (package
1594 (name "httpstat")
1595 (version "1.3.1")
1596 (source
1597 (origin
1598 (method git-fetch)
1599 (uri (git-reference
1600 (url "https://github.com/reorx/httpstat")
1601 (commit version)))
1602 (file-name (git-file-name name version))
1603 (sha256
1604 (base32 "0cw8299a080m42slsimz31xs0gjnh833gpbj2dsr4hkcinrn4iyd"))))
1605 (build-system python-build-system)
1606 (inputs `(("curl" ,curl)))
1607 (arguments
1608 '(#:phases
1609 (modify-phases %standard-phases
1610 (add-before 'build 'fix-curl-path
1611 (lambda* (#:key inputs #:allow-other-keys)
1612 (substitute* "httpstat.py"
1613 (("ENV_CURL_BIN.get\\('curl'\\)")
1614 (string-append "ENV_CURL_BIN.get('"
1615 (assoc-ref inputs "curl")
1616 "/bin/curl')"))
1617 ;; "curl -w time_*" units seems to have
1618 ;; changed from seconds to nanoseconds.
1619 (("d\\[k\\] \\* 1000") "d[k] / 1000"))
1620 #t)))))
1621 (home-page "https://github.com/reorx/httpstat")
1622 (synopsis "Visualize curl statistics")
1623 (description
1624 "@command{httpstat} is a tool to visualize statistics from the
1625 @command{curl} HTTP client. It acts as a wrapper for @command{curl} and
1626 prints timing information for each step of the HTTP request (DNS lookup,
1627 TCP connection, TLS handshake and so on) in the terminal.")
1628 (license license:expat)))
1629
1630 (define-public squid
1631 (package
1632 (name "squid")
1633 (version "4.13")
1634 (source
1635 (origin
1636 (method url-fetch)
1637 (uri (string-append "http://www.squid-cache.org/Versions/v4/squid-"
1638 version ".tar.xz"))
1639 (sha256
1640 (base32 "1q1ywpic6s7dfjj3cwzcfgscc4zq0aih462gyas7j1z683ss14b8"))))
1641 (build-system gnu-build-system)
1642 (arguments
1643 '(#:configure-flags
1644 ;; disable -march=native in build for reproducibility; see
1645 ;; https://wiki.squid-cache.org/KnowledgeBase/IllegalInstructionError
1646 (list "--disable-arch-native")
1647 #:phases
1648 (modify-phases %standard-phases
1649 (add-before 'build 'fix-true-path
1650 (lambda* (#:key inputs #:allow-other-keys)
1651 (substitute* "test-suite/testheaders.sh"
1652 (("/bin/true")
1653 (string-append (assoc-ref inputs "coreutils")
1654 "/bin/true")))
1655 #t)))))
1656 (inputs
1657 `(("perl" ,perl)
1658 ("openldap" ,openldap)
1659 ("linux-pam" ,linux-pam)
1660 ("libcap" ,libcap)
1661 ("cyrus-sasl" ,cyrus-sasl)
1662 ("expat" ,expat)
1663 ("libxml2" ,libxml2)
1664 ("openssl" ,openssl)))
1665 (native-inputs
1666 `(("cppunit" ,cppunit)
1667 ("pkg-config" ,pkg-config)))
1668 (synopsis "Web caching proxy")
1669 (description "Squid is a caching proxy for the Web supporting HTTP, HTTPS,
1670 FTP, and more. It reduces bandwidth and improves response times by caching and
1671 reusing frequently-requested web pages.")
1672 (home-page "http://www.squid-cache.org/")
1673 (license license:gpl2+)))
1674
1675 (define-public bwm-ng
1676 (package
1677 (name "bwm-ng")
1678 (version "0.6.3")
1679 (source
1680 (origin
1681 (method git-fetch)
1682 (uri (git-reference
1683 (url "https://github.com/vgropp/bwm-ng")
1684 (commit (string-append "v" version))))
1685 (file-name (git-file-name name version))
1686 (sha256
1687 (base32 "1gpp2l3w479h1w5skjra5xy0gxd24kvmk6i4psbkafnv2399la4k"))))
1688 (build-system gnu-build-system)
1689 (arguments
1690 `(#:phases
1691 (modify-phases %standard-phases
1692 (add-after 'unpack 'disable-premature-./configure
1693 (lambda _
1694 (substitute* "autogen.sh"
1695 (("\\$srcdir/configure")
1696 "true"))
1697 #t)))))
1698 (native-inputs
1699 `(("autoconf" ,autoconf)
1700 ("automake" ,automake)))
1701 (inputs
1702 `(("ncurses" ,ncurses)))
1703 (synopsis "Console based live network and disk I/O bandwidth monitor")
1704 (description "Bandwidth Monitor NG is a small and simple console based
1705 live network and disk I/O bandwidth monitor.")
1706 (home-page "https://www.gropp.org/?id=projects&sub=bwm-ng")
1707 (license license:gpl2)))
1708
1709 (define-public aircrack-ng
1710 (package
1711 (name "aircrack-ng")
1712 (version "1.6")
1713 (source
1714 (origin
1715 (method url-fetch)
1716 (uri (string-append "https://download.aircrack-ng.org/aircrack-ng-"
1717 version ".tar.gz"))
1718 (sha256
1719 (base32 "0ix2k64qg7x3w0bzdsbk1m50kcpq1ws59g3zkwiafvpwdr4gs2sg"))))
1720 (build-system gnu-build-system)
1721 (native-inputs
1722 `(("autoconf" ,autoconf)
1723 ("automake" ,automake)
1724 ("libtool" ,libtool)
1725 ("pkg-config" ,pkg-config)
1726 ("which" ,which)))
1727 (inputs
1728 `(("libgcrypt" ,libgcrypt)
1729 ("libnl" ,libnl)
1730 ("libpcap" ,libpcap)
1731 ("ethtool" ,ethtool)
1732 ("pcre" ,pcre)
1733 ("sqlite" ,sqlite)
1734 ("zlib" ,zlib)))
1735 (arguments
1736 `(#:configure-flags
1737 (list "--with-experimental=yes" ; build wesside-ng, etc.
1738 "--with-gcrypt") ; openssl's the default
1739 #:phases (modify-phases %standard-phases
1740 (add-before 'bootstrap 'patch-evalrev
1741 (lambda _
1742 ;; Called by ./autogen.sh below, before the default
1743 ;; ‘patch-shebangs’ phase has had a chance to run.
1744 (substitute* "evalrev"
1745 (("/bin/sh")
1746 (which "sh")))
1747 #t))
1748 (add-after 'build 'absolutize-tools
1749 (lambda* (#:key inputs #:allow-other-keys)
1750 (let ((ethtool (string-append (assoc-ref inputs "ethtool")
1751 "/sbin/ethtool")))
1752 (substitute* "scripts/airmon-ng"
1753 (("ethtool ")
1754 (string-append ethtool " ")))
1755 #t))))))
1756 (home-page "https://www.aircrack-ng.org")
1757 (synopsis "Assess WiFi network security")
1758 (description
1759 "Aircrack-ng is a complete suite of tools to assess WiFi network
1760 security. It focuses on different areas of WiFi security: monitoring,
1761 attacking, testing, and cracking. All tools are command-line driven, which
1762 allows for heavy scripting.")
1763 (license (list license:gpl2+ license:bsd-3))))
1764
1765 (define-public pixiewps
1766 (package
1767 (name "pixiewps")
1768 (version "1.4.2")
1769 (source (origin
1770 (method url-fetch)
1771 (uri (string-append
1772 "https://github.com/wiire-a/pixiewps/releases/"
1773 "download/v" version "/" name "-" version ".tar.xz"))
1774 (sha256
1775 (base32
1776 "07nym6bqml0k9v29vnj003nrgnwrywgjvnljb7cdpsvnwilhbp64"))))
1777 (build-system gnu-build-system)
1778 (arguments
1779 '(#:make-flags
1780 (list "CC=gcc"
1781 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1782 #:phases
1783 (modify-phases %standard-phases
1784 (delete 'configure)) ; no configure script
1785 #:tests? #f)) ; there are no tests
1786 (home-page "https://github.com/wiire-a/pixiewps/")
1787 (synopsis "Offline brute-force tool for Wi-Fi Protected Setup")
1788 (description "Pixiewps implements the pixie-dust attack to brute
1789 force the Wi-Fi Protected Setup (WPS) PIN by exploiting the low or
1790 non-existing entropy of some access points.")
1791 (license license:gpl3+)))
1792
1793 (define-public reaver
1794 (package
1795 (name "reaver")
1796 (version "1.6.6")
1797 (source (origin
1798 (method url-fetch)
1799 (uri (string-append
1800 "https://github.com/t6x/reaver-wps-fork-t6x/releases/"
1801 "download/v" version "/reaver-" version ".tar.xz"))
1802 (sha256
1803 (base32
1804 "00k7mc81ifv0wma7k4v18mj498badbw5yls6c28qin3d1gda0ag3"))))
1805 (build-system gnu-build-system)
1806 (arguments
1807 `(#:configure-flags
1808 ;; Save session files to current directory instead of /var.
1809 (list "--enable-savetocurrent"
1810 "--localstatedir=/tmp/dummy") ; prevent creating /var during install
1811 #:phases
1812 (modify-phases %standard-phases
1813 (add-before 'configure 'change-directory
1814 (lambda _
1815 (chdir "src")
1816 #t))
1817 (add-after 'install 'install-doc
1818 (lambda* (#:key outputs #:allow-other-keys)
1819 (chdir "../docs")
1820 (let* ((out (assoc-ref outputs "out"))
1821 (doc (string-append out "/share/doc/" ,name "-" ,version))
1822 (man1 (string-append out "/share/man/man1")))
1823 (for-each (lambda (file) (install-file file doc))
1824 (find-files "." "README.*"))
1825 (install-file "reaver.1" man1)
1826 #t))))
1827 #:tests? #f)) ; there are no tests
1828 (inputs
1829 `(("libpcap" ,libpcap)))
1830 (propagated-inputs
1831 `(("aircrack-ng" ,aircrack-ng)
1832 ("pixiewps" ,pixiewps)))
1833 (home-page "https://github.com/t6x/reaver-wps-fork-t6x/")
1834 (synopsis "Attack tool for Wi-Fi Protected Setup")
1835 (description "Reaver performs a brute force attack against an access
1836 point's Wi-Fi Protected Setup (WPS) PIN. Once the PIN is found, the WPA
1837 passphrase can be recovered and the AP's wireless settings can be
1838 reconfigured.")
1839 (license license:gpl2+)))
1840
1841 (define-public perl-danga-socket
1842 (package
1843 (name "perl-danga-socket")
1844 (version "1.62")
1845 (source
1846 (origin
1847 (method url-fetch)
1848 (uri (string-append "mirror://cpan/authors/id/N/NM/NML/"
1849 "Danga-Socket-" version ".tar.gz"))
1850 (sha256
1851 (base32 "0x4bvirmf0kphks19jwgva00zz73zx344218dfaiv8gigrw3yg4m"))))
1852 (build-system perl-build-system)
1853 (native-inputs
1854 `(("perl-test-tcp" ,perl-test-tcp)))
1855 (propagated-inputs
1856 `(("perl-sys-syscall" ,perl-sys-syscall)))
1857 (home-page "https://metacpan.org/release/Danga-Socket")
1858 (synopsis "Event loop and event-driven async socket base class")
1859 (description
1860 "Danga::Socket is an abstract base class for objects backed by a socket
1861 which provides the basic framework for event-driven asynchronous IO, designed
1862 to be fast. Danga::Socket is both a base class for objects, and an event
1863 loop.")
1864 (license license:perl-license)))
1865
1866 (define-public perl-data-validate-ip
1867 (package
1868 (name "perl-data-validate-ip")
1869 (version "0.27")
1870 (source
1871 (origin
1872 (method url-fetch)
1873 (uri (string-append
1874 "mirror://cpan/authors/id/D/DR/DROLSKY/Data-Validate-IP-"
1875 version ".tar.gz"))
1876 (sha256
1877 (base32 "1mmppyzsh1w2z2h86kvzqxy56wxgs62a3kf8nvcnz76bblir5ap1"))))
1878 (build-system perl-build-system)
1879 (native-inputs
1880 `(("perl-test-requires" ,perl-test-requires)))
1881 (propagated-inputs
1882 `(("perl-netaddr-ip" ,perl-netaddr-ip)))
1883 (home-page "https://metacpan.org/release/Data-Validate-IP")
1884 (synopsis "IPv4 and IPv6 validation methods")
1885 (description
1886 "This module provides several IP address validation subroutines that both
1887 validate and untaint their input. This includes both basic validation
1888 (@code{is_ipv4()} and @code{is_ipv6()}) and special cases like checking whether
1889 an address belongs to a specific network or whether an address is public or
1890 private (reserved).")
1891 (license license:perl-license)))
1892
1893 (define-public perl-net-dns
1894 (package
1895 (name "perl-net-dns")
1896 (version "1.28")
1897 (source
1898 (origin
1899 (method url-fetch)
1900 (uri
1901 (list
1902 (string-append "https://www.net-dns.org/download/Net-DNS-"
1903 version ".tar.gz")
1904 (string-append "mirror://cpan/authors/id/N/NL/NLNETLABS/Net-DNS-"
1905 version ".tar.gz")))
1906 (sha256
1907 (base32 "0kh2qbhxv005pqb35mdk2bld7cg7xnxl12qvdwv30sgd91aqica7"))))
1908 (build-system perl-build-system)
1909 (inputs
1910 `(("perl-digest-hmac" ,perl-digest-hmac)))
1911 (home-page "https://www.net-dns.org/")
1912 (synopsis
1913 "Perl Interface to the Domain Name System")
1914 (description "Net::DNS is the Perl Interface to the Domain Name System.")
1915 (license license:x11)))
1916
1917 (define-public perl-socket6
1918 (package
1919 (name "perl-socket6")
1920 (version "0.29")
1921 (source
1922 (origin
1923 (method url-fetch)
1924 (uri (string-append
1925 "mirror://cpan/authors/id/U/UM/UMEMOTO/Socket6-"
1926 version
1927 ".tar.gz"))
1928 (sha256
1929 (base32
1930 "054izici8klfxs8hr5rljib28plijpsfymy99xbzdp047bx1b2a6"))))
1931 (build-system perl-build-system)
1932 (arguments
1933 `(#:phases
1934 (modify-phases %standard-phases
1935 (replace 'configure
1936 (lambda* (#:key outputs #:allow-other-keys)
1937 (let* ((out (assoc-ref outputs "out"))
1938 (args `("Makefile.PL"
1939 ,(string-append "PREFIX=" out)
1940 "INSTALLDIRS=site")))
1941 (setenv "CONFIG_SHELL" (which "sh"))
1942 (apply invoke "perl" args)))))))
1943 (home-page "https://metacpan.org/release/Socket6")
1944 (synopsis
1945 "IPv6 related part of the C socket.h defines and structure manipulators for Perl")
1946 (description "Socket6 binds the IPv6 related part of the C socket header
1947 definitions and structure manipulators for Perl.")
1948 (license license:bsd-3)))
1949
1950 (define-public perl-net-dns-resolver-programmable
1951 (package
1952 (name "perl-net-dns-resolver-programmable")
1953 (version "0.003")
1954 (source
1955 (origin
1956 (method url-fetch)
1957 (uri (string-append
1958 "mirror://cpan/authors/id/J/JM/JMEHNLE/net-dns-resolver-programmable/"
1959 "Net-DNS-Resolver-Programmable-v" version ".tar.gz"))
1960 (sha256
1961 (base32
1962 "1v3nl2kaj4fs55n1617n53q8sa3mir06898vpy1rq98zjih24h4d"))
1963 (patches
1964 (search-patches "perl-net-dns-resolver-programmable-fix.patch"))))
1965 (build-system perl-build-system)
1966 (native-inputs
1967 `(("perl-module-build" ,perl-module-build)))
1968 (inputs `(("perl-net-dns" ,perl-net-dns)))
1969 (home-page
1970 "https://metacpan.org/release/Net-DNS-Resolver-Programmable")
1971 (synopsis
1972 "Programmable DNS resolver class for offline emulation of DNS")
1973 (description "Net::DNS::Resolver::Programmable is a programmable DNS resolver for
1974 offline emulation of DNS.")
1975 (license license:perl-license)))
1976
1977 (define-public perl-net-dns-resolver-mock
1978 (package
1979 (name "perl-net-dns-resolver-mock")
1980 (version "1.20171219")
1981 (source (origin
1982 (method url-fetch)
1983 (uri (string-append
1984 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
1985 "Net-DNS-Resolver-Mock-" version ".tar.gz"))
1986 (sha256
1987 (base32
1988 "0m3rxpkv1b9121srvbqkrgzg4m8mnydiydqv34in1i1ixwrl6jn9"))))
1989 (build-system perl-build-system)
1990 (inputs
1991 `(("perl-net-dns" ,perl-net-dns)))
1992 (home-page "https://metacpan.org/release/Net-DNS-Resolver-Mock")
1993 (synopsis "Mock DNS Resolver object for testing")
1994 (description
1995 "Net::DNS::Resolver::Mock is a subclass of Net::DNS::Resolver, but returns
1996 static data from any provided DNS zone file instead of querying the network.
1997 It is intended primarily for use in testing.")
1998 (license license:perl-license)))
1999
2000 (define-public perl-netaddr-ip
2001 (package
2002 (name "perl-netaddr-ip")
2003 (version "4.079")
2004 (source
2005 (origin
2006 (method url-fetch)
2007 (uri (string-append
2008 "mirror://cpan/authors/id/M/MI/MIKER/NetAddr-IP-"
2009 version
2010 ".tar.gz"))
2011 (sha256
2012 (base32
2013 "1rx0dinrz9fk9qcg4rwqq5n1dm3xv2arymixpclcv2q2nzgq4npc"))))
2014 (build-system perl-build-system)
2015 (arguments
2016 `(#:phases
2017 (modify-phases %standard-phases
2018 (replace 'configure
2019 (lambda* (#:key outputs #:allow-other-keys)
2020 (let* ((out (assoc-ref outputs "out"))
2021 (args `("Makefile.PL"
2022 ,(string-append "PREFIX=" out)
2023 "INSTALLDIRS=site")))
2024 (setenv "CONFIG_SHELL" (which "sh"))
2025 (apply invoke "perl" args)))))))
2026 (home-page
2027 "https://metacpan.org/release/NetAddr-IP")
2028 (synopsis
2029 "Manages IPv4 and IPv6 addresses and subnets")
2030 (description "NetAddr::IP manages IPv4 and IPv6 addresses and subsets.")
2031 (license license:perl-license)))
2032
2033 (define-public perl-net-patricia
2034 (package
2035 (name "perl-net-patricia")
2036 (version "1.22")
2037 (source
2038 (origin
2039 (method url-fetch)
2040 (uri (string-append
2041 "mirror://cpan/authors/id/G/GR/GRUBER/Net-Patricia-"
2042 version
2043 ".tar.gz"))
2044 (sha256
2045 (base32
2046 "0ln5f57vc8388kyh9vhx2infrdzfhbpgyby74h1qsnhwds95m0vh"))))
2047 (build-system perl-build-system)
2048 (arguments
2049 '(#:phases
2050 (modify-phases %standard-phases
2051 (add-after 'unpack 'dont-link-with-nsl ; Borrowed from Debian.
2052 (lambda _
2053 (substitute* "Makefile.PL"
2054 (("-lnsl") ""))
2055 #t)))))
2056 (inputs
2057 `(("perl-net-cidr-lite" ,perl-net-cidr-lite)
2058 ("perl-socket6" ,perl-socket6)))
2059 (home-page
2060 "https://metacpan.org/release/Net-Patricia")
2061 (synopsis
2062 "Patricia Trie Perl module for fast IP address lookups")
2063 (description
2064 "Net::Patricia does IP address lookups quickly in Perl.")
2065 ;; The bindings are licensed under GPL2 or later.
2066 ;; libpatricia is licensed under 2-clause BSD.
2067 (license (list license:gpl2+ license:bsd-2))))
2068
2069 (define-public perl-net-cidr-lite
2070 (package
2071 (name "perl-net-cidr-lite")
2072 (version "0.21")
2073 (source
2074 (origin
2075 (method url-fetch)
2076 (uri (string-append
2077 "mirror://cpan/authors/id/D/DO/DOUGW/Net-CIDR-Lite-"
2078 version
2079 ".tar.gz"))
2080 (sha256
2081 (base32
2082 "14shj73zbqmfjbp0qz1fs9j4p2dpvz5hfkm4qfdjbydflbl2b8fg"))))
2083 (build-system perl-build-system)
2084 (home-page
2085 "https://metacpan.org/release/Net-CIDR-Lite")
2086 (synopsis
2087 "Perl extension for merging IPv4 or IPv6 CIDR addresses")
2088 (description "Net::CIDR::Lite merges IPv4 or IPv6 CIDR addresses.")
2089 (license license:gpl1+)))
2090
2091 (define-public perl-io-socket-inet6
2092 (package
2093 (name "perl-io-socket-inet6")
2094 (version "2.72")
2095 (source
2096 (origin
2097 (method url-fetch)
2098 (uri (string-append
2099 "mirror://cpan/authors/id/S/SH/SHLOMIF/IO-Socket-INET6-"
2100 version
2101 ".tar.gz"))
2102 (sha256
2103 (base32
2104 "1fqypz6qa5rw2d5y2zq7f49frwra0aln13nhq5gi514j2zx21q45"))))
2105 (build-system perl-build-system)
2106 (native-inputs
2107 `(("perl-module-build" ,perl-module-build)
2108 ("perl-test-pod" ,perl-test-pod)
2109 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
2110 (inputs `(("perl-socket6" ,perl-socket6)))
2111 (arguments `(;; Need network socket API
2112 #:tests? #f))
2113 (home-page
2114 "https://metacpan.org/release/IO-Socket-INET6")
2115 (synopsis
2116 "Perl object interface for AF_INET/AF_INET6 domain sockets")
2117 (description "IO::Socket::INET6 is an interface for AF_INET/AF_INET6 domain
2118 sockets in Perl.")
2119 (license license:perl-license)))
2120
2121 (define-public libproxy
2122 (package
2123 (name "libproxy")
2124 (version "0.4.17")
2125 (source (origin
2126 (method url-fetch)
2127 (uri (string-append "https://github.com/libproxy/libproxy/"
2128 "releases/download/" version "/libproxy-"
2129 version ".tar.xz"))
2130 (sha256
2131 (base32
2132 "01cbgz6lc3v59sldqk96l1281kp2qxnsa2qwlf2ikvjlyr1gi2dw"))))
2133 (build-system cmake-build-system)
2134 (native-inputs
2135 `(("pkg-config" ,pkg-config)))
2136 (inputs
2137 `(("dbus" ,dbus)
2138 ("zlib" ,zlib)))
2139 (arguments
2140 `(#:phases
2141 (modify-phases %standard-phases
2142 (replace 'check
2143 (lambda _
2144 (invoke "ctest" "-E" "url-test"))))))
2145 (synopsis "Library providing automatic proxy configuration management")
2146 (description "Libproxy handles the details of HTTP/HTTPS proxy
2147 configuration for applications across all scenarios. Applications using
2148 libproxy only have to specify which proxy to use.")
2149 (home-page "https://libproxy.github.io/libproxy")
2150 (license license:lgpl2.1+)))
2151
2152 (define-public proxychains-ng
2153 (package
2154 (name "proxychains-ng")
2155 (version "4.14")
2156 (source
2157 (origin
2158 (method url-fetch)
2159 (uri (string-append "http://ftp.barfooze.de/pub/sabotage/tarballs/"
2160 "proxychains-ng-" version ".tar.xz"))
2161 (sha256
2162 (base32 "1bmhfbl1bzc87vl0xwr1wh5xvslfyc41nl2hqzhbj258p0sy004x"))))
2163 (build-system gnu-build-system)
2164 (arguments
2165 `(#:tests? #f ; there are no tests
2166 #:phases
2167 (modify-phases %standard-phases
2168 (add-after 'unpack 'fix-configure-script
2169 (lambda _
2170 ;; The configure script is very intolerant to unknown arguments,
2171 ;; such as "CONFIG_SHELL".
2172 (substitute* "configure"
2173 (("\\*\\) break ;;" line)
2174 (string-append "[A-Z]*) shift ;;\n"
2175 line)))
2176 #t))
2177 (add-before 'configure 'set-up-environment
2178 (lambda _
2179 (setenv "CC" "gcc")
2180 #t)))))
2181 (synopsis "Redirect any TCP connection through a proxy or proxy chain")
2182 (description "Proxychains-ng is a preloader which hooks calls to sockets
2183 in dynamically linked programs and redirects them through one or more SOCKS or
2184 HTTP proxies.")
2185 (home-page "https://github.com/rofl0r/proxychains-ng")
2186 (license license:gpl2+)))
2187
2188 (define-public enet
2189 (package
2190 (name "enet")
2191 (version "1.3.17")
2192 (source
2193 (origin
2194 (method url-fetch)
2195 (uri (string-append "http://enet.bespin.org/download/"
2196 "enet-" version ".tar.gz"))
2197 (sha256
2198 (base32 "1p6f9mby86af6cs7pv6h48032ip9g32c05cb7d9mimam8lchz3x3"))))
2199 (build-system gnu-build-system)
2200 (native-inputs
2201 `(("pkg-config" ,pkg-config)))
2202 (synopsis "Network communication layer on top of UDP")
2203 (description
2204 "ENet's purpose is to provide a relatively thin, simple and robust network
2205 communication layer on top of UDP. The primary feature it provides is optional
2206 reliable, in-order delivery of packets. ENet omits certain higher level
2207 networking features such as authentication, server discovery, encryption, or
2208 other similar tasks that are particularly application specific so that the
2209 library remains flexible, portable, and easily embeddable.")
2210 (home-page "http://enet.bespin.org")
2211 (license license:expat)))
2212
2213 (define-public sslh
2214 (package
2215 (name "sslh")
2216 (version "1.21c")
2217 (source
2218 (origin
2219 (method git-fetch)
2220 (uri (git-reference
2221 (url "https://github.com/yrutschle/sslh")
2222 (commit (string-append "v" version))))
2223 (file-name (git-file-name name version))
2224 (sha256
2225 (base32 "19h32dn0076p3s7dn35qi5yp2xvnxw9sqphppmn72vyb8caxvw1z"))))
2226 (build-system gnu-build-system)
2227 (native-inputs
2228 `(;; Test dependencies.
2229 ("lcov" ,lcov)
2230 ("perl" ,perl)
2231 ("perl-conf-libconfig" ,perl-conf-libconfig)
2232 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
2233 ("perl-socket6" ,perl-socket6)
2234 ("psmisc" ,psmisc))) ; for ‘killall’
2235 (inputs
2236 `(("libcap" ,libcap)
2237 ("libconfig" ,libconfig)
2238 ("pcre" ,pcre)
2239 ("tcp-wrappers" ,tcp-wrappers)))
2240 (arguments
2241 '(#:phases
2242 (modify-phases %standard-phases
2243 (delete 'configure) ; no configure script
2244 (add-before 'check 'fix-tests
2245 (lambda _
2246 (substitute* "./t"
2247 (("\"/tmp") "$ENV{\"TMPDIR\"} . \"")
2248 ;; The Guix build environment lacks ‘ip6-localhost’.
2249 (("ip6-localhost") "localhost"))
2250 #t))
2251 ;; Many of these files are mentioned in the man page. Install them.
2252 (add-after 'install 'install-documentation
2253 (lambda* (#:key outputs #:allow-other-keys)
2254 (let* ((out (assoc-ref outputs "out"))
2255 (doc (string-append out "/share/doc/sslh")))
2256 (install-file "README.md" doc)
2257 (for-each
2258 (lambda (file)
2259 (install-file file (string-append doc "/examples")))
2260 (append (find-files "." "\\.cfg")
2261 (find-files "scripts"))))
2262 #t)))
2263 #:make-flags (list "CC=gcc"
2264 "USELIBCAP=1"
2265 "USELIBWRAP=1"
2266 (string-append "PREFIX=" (assoc-ref %outputs "out")))
2267 #:test-target "test"))
2268 (home-page "https://www.rutschle.net/tech/sslh/README.html")
2269 (synopsis "Applicative network protocol demultiplexer")
2270 (description
2271 "sslh is a network protocol demultiplexer. It acts like a switchboard,
2272 accepting connections from clients on one port and forwarding them to different
2273 servers based on the contents of the first received data packet. Detection of
2274 common protocols like HTTP(S), SSL, SSH, OpenVPN, tinc, and XMPP is already
2275 implemented, but any other protocol that matches a regular expression can be
2276 added. sslh's name comes from its original application of serving both SSH and
2277 HTTPS on port 443, allowing SSH connections from inside corporate firewalls
2278 that block port 22.")
2279 (license (list license:bsd-2 ; tls.[ch]
2280 license:gpl2+)))) ; everything else
2281
2282 (define-public iperf
2283 (package
2284 (name "iperf")
2285 (version "3.9")
2286 (source (origin
2287 (method url-fetch)
2288 (uri (string-append "http://downloads.es.net/pub/iperf"
2289 "/iperf-" version ".tar.gz"))
2290 (sha256
2291 (base32
2292 "0f601avdmzpwsa3lbi0ppjhkrdipm5wifhhxy5czf99370k3mdi4"))))
2293 (build-system gnu-build-system)
2294 (synopsis "TCP, UDP and SCTP bandwidth measurement tool")
2295 (description
2296 "iPerf is a tool to measure achievable bandwidth on IP networks. It
2297 supports tuning of various parameters related to timing, buffers and
2298 protocols (TCP, UDP, SCTP with IPv4 and IPv6). For each test it reports
2299 the bandwidth, loss, and other parameters.")
2300 (home-page "https://software.es.net/iperf/")
2301 (license (list license:bsd-3 ; Main distribution.
2302 license:ncsa ; src/{units,iperf_locale,tcp_window_size}.c
2303 license:expat ; src/{cjson,net}.[ch]
2304 license:public-domain)))) ; src/portable_endian.h
2305
2306 (define-public nethogs
2307 (package
2308 (name "nethogs")
2309 (version "0.8.6")
2310 (source
2311 (origin
2312 (method git-fetch)
2313 (uri (git-reference
2314 (url "https://github.com/raboof/nethogs")
2315 (commit (string-append "v" version))))
2316 (hash
2317 (content-hash
2318 (base32 "0sn1sdp86akwlm4r1vmkxjjl50c0xaisk91bbz57z7kcsaphxna9")
2319 sha256))
2320 (file-name (git-file-name name version))))
2321 (build-system gnu-build-system)
2322 (inputs
2323 `(("libpcap" ,libpcap)
2324 ("ncurses" ,ncurses)))
2325 (arguments
2326 `(#:make-flags `("CC=gcc"
2327 ,(string-append "PREFIX=" %output)
2328 ,(string-append "VERSION=" ,version))
2329 #:phases
2330 (modify-phases %standard-phases
2331 (delete 'configure)))) ; no ./configure script.
2332 (home-page "https://github.com/raboof/nethogs")
2333 (synopsis "Per-process bandwidth monitor")
2334 (description "NetHogs is a small 'net top' tool for Linux. Instead of
2335 breaking the traffic down per protocol or per subnet, like most tools do, it
2336 groups bandwidth by process.
2337
2338 NetHogs does not rely on a special kernel module to be loaded. If there's
2339 suddenly a lot of network traffic, you can fire up NetHogs and immediately see
2340 which PID is causing this. This makes it easy to identify programs that have
2341 gone wild and are suddenly taking up your bandwidth.")
2342 (license license:gpl2+)))
2343
2344 (define-public nzbget
2345 (package
2346 (name "nzbget")
2347 (version "21.0")
2348 (source
2349 (origin
2350 (method url-fetch)
2351 (uri (string-append "https://github.com/nzbget/nzbget/releases"
2352 "/download/v" version
2353 "/nzbget-" version "-src.tar.gz"))
2354 (sha256
2355 (base32
2356 "0lwd0pfrs4a5ms193hgz2qiyf7grrc925dw6y0nfc0gkp27db9b5"))
2357 (modules '((guix build utils)))
2358 (snippet
2359 ;; Reported upstream as <https://github.com/nzbget/nzbget/pull/414>.
2360 '(begin
2361 (substitute* "daemon/connect/TlsSocket.cpp"
2362 (("gnutls_certificate-verification_status_print")
2363 "gnutls_certificate_verification_status_print"))
2364 #t))))
2365 (arguments
2366 `(#:configure-flags
2367 (list
2368 (string-append "--with-libcurses-includes="
2369 (assoc-ref %build-inputs "ncurses") "/include")
2370 (string-append "--with-libcurses-libraries="
2371 (assoc-ref %build-inputs "ncurses") "/lib")
2372 (string-append "--with-tlslib=GnuTLS"))))
2373 (build-system gnu-build-system)
2374 (inputs `(("gnutls" ,gnutls)
2375 ("libxml2" ,libxml2)
2376 ("ncurses" ,ncurses)
2377 ("zlib" ,zlib)))
2378 (native-inputs `(("pkg-config" ,pkg-config)))
2379 (home-page "https://github.com/nzbget/nzbget")
2380 (synopsis "Usenet binary file downloader")
2381 (description
2382 "NZBGet is a binary newsgrabber, which downloads files from Usenet based
2383 on information given in @code{nzb} files. NZBGet can be used in standalone
2384 and in server/client modes. In standalone mode, you pass NZBGet @command{nzb}
2385 files as command-line parameters and it downloads them and exits. NZBGet also
2386 contains a Web interface. Its server can be controlled through remote
2387 procedure calls (RPCs).")
2388 (license license:gpl2+)))
2389
2390 (define-public openvswitch
2391 (package
2392 (name "openvswitch")
2393 (version "2.13.3")
2394 (source (origin
2395 (method url-fetch)
2396 (uri (string-append
2397 "https://www.openvswitch.org/releases/openvswitch-"
2398 version ".tar.gz"))
2399 (sha256
2400 (base32
2401 "1wc5zspy9aln7di7m9a1qy4lv3h05gmhgd1nffhb9nxdcxqgnpgp"))))
2402 (build-system gnu-build-system)
2403 (arguments
2404 '(;; FIXME: many tests fail with:
2405 ;; […]
2406 ;; test -e $OVS_RUNDIR/ovs-vswitchd.pid
2407 ;; ovs-appctl -t ovs-vswitchd exit
2408 ;; hard failure
2409 #:tests? #f
2410 #:configure-flags
2411 '("--enable-shared"
2412 "--localstatedir=/var"
2413 "--with-dbdir=/var/lib/openvswitch")
2414 #:phases
2415 (modify-phases %standard-phases
2416 (replace 'install
2417 (lambda _
2418 (invoke "make"
2419 ;; Don't try to create directories under /var.
2420 "RUNDIR=/tmp"
2421 "PKIDIR=/tmp"
2422 "LOGDIR=/tmp"
2423 "DBDIR=/tmp"
2424 "install"))))))
2425 (native-inputs
2426 `(("perl" ,perl)
2427 ("pkg-config" ,pkg-config)
2428 ("python" ,python-wrapper)
2429 ;; for testing
2430 ("util-linux" ,util-linux)))
2431 (inputs
2432 `(("libcap-ng" ,libcap-ng)
2433 ("openssl" ,openssl)))
2434 (synopsis "Virtual network switch")
2435 (home-page "https://www.openvswitch.org/")
2436 (description
2437 "Open vSwitch is a multilayer virtual switch. It is designed to enable
2438 massive network automation through programmatic extension, while still
2439 supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
2440 IPFIX, RSPAN, CLI, LACP, 802.1ag).")
2441 (license ; see debian/copyright for detail
2442 (list license:lgpl2.1 ; xenserver and utilities/bugtool
2443 license:gpl2 ; datapath
2444 license:bsd-2 license:bsd-3
2445 license:asl2.0)))) ; all other
2446
2447 (define-public python-ipy
2448 (package
2449 (name "python-ipy")
2450 (version "1.00")
2451 (source (origin
2452 (method url-fetch)
2453 (uri (pypi-uri "IPy" version))
2454 (sha256
2455 (base32
2456 "08d6kcacj67mvh0b6y765ipccy6gi4w2ndd4v1l3im2qm1cgcarg"))))
2457 (build-system python-build-system)
2458 (home-page "https://github.com/autocracy/python-ipy/")
2459 (synopsis "Python class and tools for handling IP addresses and networks")
2460 (description "The @code{IP} class allows a comfortable parsing and
2461 handling for most notations in use for IPv4 and IPv6 addresses and
2462 networks.")
2463 (license license:bsd-3)))
2464
2465 (define-public python2-ipy
2466 (package-with-python2 python-ipy))
2467
2468 (define-public speedtest-cli
2469 (package
2470 (name "speedtest-cli")
2471 (version "2.1.2")
2472 (source
2473 (origin
2474 (method git-fetch)
2475 (uri (git-reference
2476 (url "https://github.com/sivel/speedtest-cli")
2477 (commit (string-append "v" version))))
2478 (file-name (git-file-name name version))
2479 (sha256
2480 (base32 "1456yly6iym2c9bl6pi4sz8xbw34bm2dxm1vzpydsd6jazwpmy26"))))
2481 (build-system python-build-system)
2482 (home-page "https://github.com/sivel/speedtest-cli")
2483 (synopsis "Internet bandwidth tester")
2484 (description
2485 "Command line interface for testing internet bandwidth using
2486 speedtest.net.")
2487 (license license:asl2.0)))
2488
2489 (define-public tftp-hpa
2490 (package
2491 (name "tftp-hpa")
2492 (version "5.2")
2493 (source (origin
2494 (method url-fetch)
2495 (uri (string-append "mirror://kernel.org/software/"
2496 "network/tftp/tftp-hpa/tftp-hpa-" version
2497 ".tar.xz"))
2498 (sha256
2499 (base32
2500 "12vidchglhyc20znq5wdsbhi9mqg90jnl7qr9qs8hbvaz4fkdvmg"))))
2501 (build-system gnu-build-system)
2502 (arguments `(#:tests? #f)) ; no test target
2503 (synopsis "HPA's tftp client")
2504 (description
2505 "This is a tftp client derived from OpenBSD tftp with some extra options
2506 added and bugs fixed. The source includes readline support but it is not
2507 enabled due to license conflicts between the BSD advertising clause and the GPL.")
2508 (home-page "https://git.kernel.org/cgit/network/tftp/tftp-hpa.git/about/")
2509 ;; Some source files are distributed under a 3-clause BSD license, and
2510 ;; others under a 4-clause BSD license. Refer to the files in the source
2511 ;; distribution for clarification.
2512 (license (list license:bsd-3 license:bsd-4))))
2513
2514 (define-public pidentd
2515 (package
2516 (name "pidentd")
2517 (version "3.0.19")
2518 (source
2519 (origin
2520 (method git-fetch)
2521 (uri (git-reference
2522 (url "https://github.com/ptrrkssn/pidentd")
2523 (commit (string-append "v" version))))
2524 (file-name (git-file-name name version))
2525 (sha256
2526 (base32
2527 "1k4rr0b4ygxssbnsykzjvz4hjhazzz4j5arlilyc1iq7b1wzsk7i"))))
2528 (build-system gnu-build-system)
2529 (arguments
2530 `(#:tests? #f)) ; No tests are included
2531 (inputs
2532 `(("openssl" ,openssl-1.0))) ;for the DES library
2533 (home-page "https://www.lysator.liu.se/~pen/pidentd/")
2534 (synopsis "Small Ident Daemon")
2535 (description
2536 "@dfn{Pidentd} (Peter's Ident Daemon) is an identd, which implements a
2537 identification server. Pidentd looks up specific TCP/IP connections and
2538 returns the user name and other information about the connection.")
2539 (license license:public-domain)))
2540
2541 (define-public spiped
2542 (package
2543 (name "spiped")
2544 (version "1.6.1")
2545 (source (origin
2546 (method url-fetch)
2547 (uri (string-append "https://www.tarsnap.com/spiped/spiped-"
2548 version ".tgz"))
2549 (sha256
2550 (base32
2551 "04rpnc53whfky7pp2m9h35gwzwn6788pnl6c1qd576mpknbqjw4d"))))
2552 (build-system gnu-build-system)
2553 (arguments
2554 '(#:test-target "test"
2555 #:make-flags (let* ((out (assoc-ref %outputs "out"))
2556 (bindir (string-append out "/bin"))
2557 (man1dir (string-append out "/share/man/man1")))
2558 (list "CC=gcc" ; It tries to invoke `c99`.
2559 (string-append "BINDIR=" bindir)
2560 (string-append "MAN1DIR=" man1dir)))
2561 #:phases
2562 (modify-phases %standard-phases
2563 (add-after 'unpack 'patch-command-invocations
2564 (lambda _
2565 (substitute* '("Makefile"
2566 "libcperciva/cpusupport/Build/cpusupport.sh"
2567 "libcperciva/POSIX/posix-cflags.sh"
2568 "libcperciva/POSIX/posix-l.sh")
2569 (("command -p") ""))
2570 #t))
2571 (delete 'configure) ; No ./configure script.
2572 (add-after 'install 'install-more-docs
2573 (lambda* (#:key outputs #:allow-other-keys)
2574 (let* ((out (assoc-ref %outputs "out"))
2575 (misc (string-append out "/share/doc/spiped")))
2576 (install-file "DESIGN.md" misc)
2577 #t))))))
2578 (native-inputs
2579 `(("procps" ,procps))) ; `ps` is used by the test suite.
2580 (inputs
2581 `(("openssl" ,openssl)))
2582 (home-page "https://www.tarsnap.com/spiped.html")
2583 (synopsis "Create secure pipes between sockets")
2584 (description "Spiped (pronounced \"ess-pipe-dee\") is a utility for creating
2585 symmetrically encrypted and authenticated pipes between socket addresses, so
2586 that one may connect to one address (e.g., a UNIX socket on localhost) and
2587 transparently have a connection established to another address (e.g., a UNIX
2588 socket on a different system). This is similar to 'ssh -L' functionality, but
2589 does not use SSH and requires a pre-shared symmetric key.")
2590 (license license:bsd-2)))
2591
2592 (define-public quagga
2593 (package
2594 (name "quagga")
2595 (version "1.2.4")
2596 (source (origin
2597 (method url-fetch)
2598 (uri (string-append "mirror://savannah/quagga/quagga-"
2599 version ".tar.gz"))
2600 (sha256
2601 (base32
2602 "1lsksqxij5f1llqn86pkygrf5672kvrqn1kvxghi169hqf1c0r73"))
2603 (patches
2604 (search-patches "quagga-reproducible-build.patch"))))
2605 (build-system gnu-build-system)
2606 (native-inputs `(("pkg-config" ,pkg-config)
2607 ("perl" ,perl)
2608 ("dejagnu" ,dejagnu)))
2609 (inputs `(("readline" ,readline)
2610 ("c-ares" ,c-ares)))
2611 (synopsis "Routing Software Suite")
2612 (description "Quagga is a routing software suite, providing implementations
2613 of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for Unix platforms.
2614
2615 The Quagga architecture consists of a core daemon, @command{zebra}, which
2616 acts as an abstraction layer to the underlying Unix kernel and presents the
2617 Zserv API over a Unix or TCP stream to Quagga clients. It is these Zserv
2618 clients which typically implement a routing protocol and communicate routing
2619 updates to the zebra daemon.")
2620 (home-page "https://www.nongnu.org/quagga/")
2621 (license license:gpl2+)))
2622
2623 (define-public thc-ipv6
2624 (let ((revision "0")
2625 (commit "4bb72573e0950ce6f8ca2800a10748477020029e"))
2626 (package
2627 (name "thc-ipv6")
2628 (version (git-version "3.4" revision commit))
2629 (source (origin
2630 (method git-fetch)
2631 (uri (git-reference
2632 (url "https://github.com/vanhauser-thc/thc-ipv6")
2633 (commit commit)))
2634 (file-name (git-file-name name version))
2635 (sha256
2636 (base32
2637 "1x5i6vbsddqc2yks7r1a2fw2fk16qxvd6hpzh1lykjfpkal8fdir"))))
2638 (build-system gnu-build-system)
2639 (arguments
2640 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2641 #:tests? #f ; No test suite.
2642 #:phases
2643 (modify-phases %standard-phases
2644 (delete 'configure) ; No ./configure script.
2645 (add-before 'build 'patch-paths
2646 (lambda _
2647 (substitute* "Makefile"
2648 (("/bin/echo") "echo"))
2649 #t))
2650 (add-after 'install 'install-more-docs
2651 (lambda* (#:key outputs #:allow-other-keys)
2652 (let* ((out (assoc-ref outputs "out"))
2653 (doc (string-append out "/share/thc-ipv6/doc")))
2654 (install-file "README" doc)
2655 (install-file "HOWTO-INJECT" doc)
2656 #t))))))
2657 ;; TODO Add libnetfilter-queue once packaged.
2658 (inputs
2659 `(("libpcap" ,libpcap)
2660 ("openssl" ,openssl)
2661 ("perl" ,perl)))
2662 (home-page "https://github.com/vanhauser-thc/thc-ipv6")
2663 (synopsis "IPv6 security research toolkit")
2664 (description "The THC IPv6 Toolkit provides command-line tools and a library
2665 for researching IPv6 implementations and deployments. It requires Linux 2.6 or
2666 newer and only works on Ethernet network interfaces.")
2667 ;; AGPL 3 with exception for linking with OpenSSL. See the 'LICENSE' file in
2668 ;; the source distribution for more information.
2669 (license license:agpl3))))
2670
2671 (define-public bmon
2672 (package
2673 (name "bmon")
2674 (version "4.0")
2675 (source
2676 (origin
2677 (method url-fetch)
2678 (uri (string-append "https://github.com/tgraf/bmon/releases/download/v"
2679 version "/bmon-" version ".tar.gz"))
2680 (sha256
2681 (base32
2682 "0ylzriv4pwh76344abzl1w219x188gshbycbna35gsyfp09c7z82"))))
2683 (build-system gnu-build-system)
2684 (inputs
2685 `(("libconfuse" ,libconfuse)
2686 ("libnl" ,libnl)
2687 ("ncurses" ,ncurses)))
2688 (native-inputs
2689 `(("pkg-config" ,pkg-config)))
2690 (synopsis "Bandwidth monitor")
2691 (description "bmon is a monitoring and debugging tool to capture
2692 networking-related statistics and prepare them visually in a human-friendly
2693 way. It features various output methods including an interactive curses user
2694 interface and a programmable text output for scripting.")
2695 (home-page "https://github.com/tgraf/bmon")
2696 ;; README.md mentions both the 2-clause BSD and expat licenses, but all
2697 ;; the source files only have expat license headers. Upstream has been
2698 ;; contacted for clarification: https://github.com/tgraf/bmon/issues/59
2699 ;; Update the license field when upstream responds.
2700 (license (list license:bsd-2
2701 license:expat))))
2702
2703 (define-public libnet
2704 (package
2705 (name "libnet")
2706 (version "1.2")
2707 (source
2708 (origin
2709 (method url-fetch)
2710 (uri (string-append "https://github.com/libnet/libnet/releases/download"
2711 "/v" version "/libnet-" version ".tar.gz"))
2712 (sha256
2713 (base32
2714 "19ys9vxk6fg70yzzdxsphfr0rwzgxxhr9b3ykhpg7rfray0qd96a"))))
2715 (build-system gnu-build-system)
2716 (arguments
2717 `(#:phases
2718 (modify-phases %standard-phases
2719 (add-before 'build 'build-doc
2720 (lambda* (#:key make-flags #:allow-other-keys)
2721 (apply invoke "make" "-C" "doc" "doc"
2722 make-flags))))))
2723 (native-inputs
2724 `(;; To build the documentation, Doxygen and Perl is required.
2725 ("doxygen" ,doxygen)
2726 ("perl" ,perl)))
2727 (home-page "https://github.com/libnet/libnet")
2728 (synopsis "Framework for low-level network packet construction")
2729 (description
2730 "Libnet provides a fairly portable framework for network packet
2731 construction and injection. It features portable packet creation interfaces
2732 at the IP layer and link layer, as well as a host of supplementary
2733 functionality. Using libnet, quick and simple packet assembly applications
2734 can be whipped up with little effort.")
2735 (license license:bsd-2)))
2736
2737 (define-public mtr
2738 (package
2739 (name "mtr")
2740 (version "0.94")
2741 (source
2742 (origin
2743 (method url-fetch)
2744 (uri (string-append "ftp://ftp.bitwizard.nl/mtr/"
2745 "mtr-" version ".tar.gz"))
2746 (sha256
2747 (base32 "1glxvlqskcmjkxlqk9i12hcfaxb389cx2n8ji7776gmix3aq4z1z"))))
2748 (build-system gnu-build-system)
2749 (inputs
2750 `(("libcap" ,libcap)
2751 ("ncurses" ,ncurses)))
2752 (arguments
2753 `(#:tests? #f)) ; tests require network access
2754 (home-page "https://www.bitwizard.nl/mtr/")
2755 (synopsis "Network diagnostic tool")
2756 (description
2757 "@acronym{mtr, My TraceRoute} combines the functionality of the
2758 @command{traceroute} and @command{ping} programs in a single network diagnostic
2759 tool. @command{mtr} can use several network protocols to detect intermediate
2760 routers (or @dfn{hops}) between the local host and a user-specified destination.
2761 It then continually measures the response time and packet loss at each hop, and
2762 displays the results in real time.")
2763 (license license:gpl2+)))
2764
2765 (define-public strongswan
2766 (package
2767 (name "strongswan")
2768 (version "5.8.4")
2769 (source
2770 (origin
2771 (method url-fetch)
2772 (uri (string-append "https://download.strongswan.org/strongswan-"
2773 version ".tar.bz2"))
2774 (sha256
2775 (base32 "0g2m08gmgdi3qvvqz6zy7n16np53sp232xd0rdc2vdhk73img6id"))))
2776 (build-system gnu-build-system)
2777 (arguments
2778 `(#:phases
2779 (modify-phases %standard-phases
2780 (add-before 'build 'patch-command-file-names
2781 (lambda* (#:key inputs #:allow-other-keys)
2782 (substitute* "src/libstrongswan/utils/process.c"
2783 (("/bin/sh")
2784 (string-append (assoc-ref inputs "bash") "/bin/sh")))
2785
2786 (substitute* "src/libstrongswan/tests/suites/test_process.c"
2787 (("/bin/sh") (which "sh"))
2788 (("/bin/echo") (which "echo"))
2789 (("cat") (which "cat")))
2790 #t))
2791 (add-before 'check 'set-up-test-environment
2792 (lambda* (#:key inputs #:allow-other-keys)
2793 (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
2794 "/share/zoneinfo"))
2795 #t)))
2796 #:configure-flags
2797 (list
2798 ;; Disable bsd-4 licensed plugins.
2799 "--disable-des"
2800 "--disable-blowfish")))
2801 (inputs
2802 `(("curl" ,curl)
2803 ("gmp" ,gmp)
2804 ("libgcrypt" ,libgcrypt)
2805 ("openssl" ,openssl)))
2806 (native-inputs
2807 `(("coreutils" ,coreutils)
2808 ("tzdata" ,tzdata-for-tests)))
2809 (synopsis "IKEv1/v2 keying daemon")
2810 (description "StrongSwan is an IPsec implementation originally based upon
2811 the FreeS/WAN project. It contains support for IKEv1, IKEv2, MOBIKE, IPv6,
2812 NAT-T and more.")
2813 (home-page "https://strongswan.org/")
2814 (license
2815 (list license:gpl2+
2816 ;; src/aikgen/*
2817 ;; src/libcharon/plugins/dnscert/*
2818 ;; src/libcharon/plugins/ext_auth/*
2819 ;; src/libcharon/plugins/vici/ruby/*
2820 ;; src/libcharon/plugins/xauth_pam/xauth_pam_listener.[ch]
2821 license:expat
2822 ;; src/inclue/sys/*
2823 license:bsd-3
2824 ;; src/libstrongswan/plugins/sha3/sha3_keccak.c
2825 license:public-domain
2826 ;; src/libstrongswan/plugins/pkcs11/pkcs11.h
2827 (license:non-copyleft
2828 "file://src/libstrongswan/plugins/pkcs11/pkcs11.h"
2829 "pkcs11 contains a unknown permissive license. View the specific
2830 file for more details.")
2831 ;; These files are not included in the
2832 ;; build, they are disabled through
2833 ;; options to ./configure
2834 ;;
2835 ;; src/libstrongswan/plugins/blowfish/bf_enc.c
2836 ;; src/libstrongswan/plugins/blowfish/bf_locl.h
2837 ;; src/libstrongswan/plugins/blowfish/bf_pi.h
2838 ;; src/libstrongswan/plugins/blowfish/bf_skey.c
2839 ;; src/libstrongswan/plugins/blowfish/blowfish_crypter.c
2840 ;; src/libstrongswan/plugins/des/des_crypter.c
2841 license:bsd-4))))
2842
2843 (define-public amule
2844 (package
2845 (name "amule")
2846 (version "2.3.2")
2847 (source (origin
2848 (method git-fetch)
2849 (uri (git-reference
2850 (url "https://github.com/amule-project/amule")
2851 (commit version)))
2852 (file-name (git-file-name name version))
2853 (sha256
2854 (base32
2855 "010wxm6g9f92x6fympj501zbnjka32rzbx0sk3a2y4zpih5d2nsn"))
2856 ;; Patch for adopting crypto++ >= 6.0.
2857 (patches (search-patches "amule-crypto-6.patch"))))
2858 (build-system gnu-build-system)
2859 (arguments
2860 `(#:phases
2861 (modify-phases %standard-phases
2862 (delete 'bootstrap) ; bootstrap phase runs too early.
2863 (add-after 'patch-source-shebangs 'autogen
2864 (lambda _
2865 (invoke "sh" "autogen.sh")
2866 #t)))
2867 #:configure-flags
2868 '("--disable-rpath"
2869 "--enable-wxcas"
2870 "--enable-cas"
2871 "--enable-alc"
2872 "--enable-alcc"
2873 "--enable-xas"
2874 "--enable-amulecmd"
2875 "--enable-geoip"
2876 "--enable-ccache"
2877 "--enable-nls"
2878 "--enable-optimize"
2879 "--enable-amule-gui"
2880 "--enable-amule-daemon"
2881 "--enable-webserver"
2882 "--with-denoise-level=0")))
2883 (native-inputs
2884 `(("autoconf" ,autoconf)
2885 ("automake" ,automake)
2886 ("gettext-minimal" ,gettext-minimal)
2887 ("perl" ,perl)))
2888 (inputs
2889 `(("zlib" ,zlib)
2890 ("crypto++" ,crypto++)
2891 ("libpng" ,libpng)
2892 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2893 (home-page "http://amule.org/")
2894 (synopsis "Peer-to-peer client for the eD2K and Kademlia networks")
2895 (description
2896 "aMule is an eMule-like client for the eD2k and Kademlia peer-to-peer
2897 file sharing networks. It includes a graphical user interface (GUI), a daemon
2898 allowing you to run a client with no graphical interface, and a Web GUI for
2899 remote access. The @command{amulecmd} command allows you to control aMule
2900 remotely.")
2901 (license license:gpl2+)))
2902
2903 (define-public zyre
2904 (package
2905 (name "zyre")
2906 (version "2.0.0")
2907 (source (origin
2908 (method url-fetch)
2909 (uri
2910 (string-append "https://github.com/zeromq/zyre/releases/download/v"
2911 version "/" name "-" version ".tar.gz"))
2912 (sha256
2913 (base32
2914 "0qz2730bng1gs9xbqxhkw88qbsmszgmmrl2g9k6xrg6r3bqvsdc7"))))
2915 (build-system gnu-build-system)
2916 (inputs `(("zeromq" ,zeromq)
2917 ("czmq" ,czmq)
2918 ("libsodium" ,libsodium)))
2919 (synopsis "Framework for proximity-based peer-to-peer applications")
2920 (description "Zyre provides reliable group messaging over local area
2921 networks using zeromq. It has these key characteristics:
2922
2923 @itemize
2924 @item Zyre needs no administration or configuration.
2925 @item Peers may join and leave the network at any time.
2926 @item Peers talk to each other without any central brokers or servers.
2927 @item Peers can talk directly to each other.
2928 @item Peers can join groups, and then talk to groups.
2929 @item Zyre is reliable, and loses no messages even when the network is heavily loaded.
2930 @item Zyre is fast and has low latency, requiring no consensus protocols.
2931 @item Zyre is designed for WiFi networks, yet also works well on Ethernet networks.
2932 @end itemize")
2933 (home-page "https://github.com/zeromq/zyre")
2934 (license license:mpl2.0)))
2935
2936 (define-public libsocketcan
2937 (package
2938 (name "libsocketcan")
2939 (version "0.0.11")
2940 (source (origin
2941 (method git-fetch)
2942 (uri (git-reference
2943 (url "https://git.pengutronix.de/cgit/tools/libsocketcan")
2944 (commit (string-append "v" version))))
2945 (file-name (git-file-name name version))
2946 (sha256
2947 (base32
2948 "17z2y2r9xkixhr9bxr50m77fh710afl30s7jdhbxrvf56vmal2jr"))))
2949 (build-system gnu-build-system)
2950 (native-inputs
2951 `(("autoconf" ,autoconf)
2952 ("automake" ,automake)
2953 ("libtool" ,libtool)))
2954 (home-page "https://git.pengutronix.de/cgit/tools/libsocketcan")
2955 (synopsis "SocketCAN user-space library")
2956 (description "This library allows controlling basic functions in SocketCAN
2957 from user-space. It requires a kernel built with SocketCAN support.")
2958 (license license:lgpl2.1+)))
2959
2960 (define-public can-utils
2961 (package
2962 (name "can-utils")
2963 (version "2020.02.04")
2964 (source (origin
2965 (method git-fetch)
2966 (uri (git-reference
2967 (url "https://github.com/linux-can/can-utils")
2968 (commit (string-append "v" version))))
2969 (file-name (git-file-name name version))
2970 (sha256
2971 (base32
2972 "1a3j1mmnb7pvgc8r7zzp6sdp7903in2hna6bmpraxln7cwlzn4l6"))))
2973 (build-system gnu-build-system)
2974 (arguments
2975 `(#:tests? #f ; No tests exist.
2976 #:make-flags (list "CC=gcc"
2977 (string-append "PREFIX="
2978 (assoc-ref %outputs "out")))
2979 #:phases
2980 (modify-phases %standard-phases
2981 (delete 'bootstrap)
2982 (delete 'configure))))
2983 (home-page "https://github.com/linux-can/can-utils")
2984 (synopsis "CAN utilities")
2985 (description "This package provides CAN utilities in the following areas:
2986
2987 @itemize
2988 @item Basic tools to display, record, generate and replay CAN traffic
2989 @item CAN access via IP sockets
2990 @item CAN in-kernel gateway configuration
2991 @item CAN bus measurement and testing
2992 @item ISO-TP (ISO15765-2:2016 - this means messages with a body larger than
2993 eight bytes) tools
2994 @item Log file converters
2995 @item Serial Line Discipline configuration for slcan driver
2996 @end itemize")
2997 ;; Either BSD-3 or GPL-2 can be used.
2998 (license (list license:bsd-3 license:gpl2))))
2999
3000 (define-public asio
3001 (package
3002 (name "asio")
3003 (version "1.12.2")
3004 (source
3005 (origin
3006 (method url-fetch)
3007 (uri (string-append "mirror://sourceforge/asio/asio/"
3008 version " (Stable)/asio-" version ".tar.bz2"))
3009 (sha256
3010 (base32 "1akray4l3hgahmb92sbvsqg128c7g7s92jrkf1sp1fjnfjrxq9sf"))))
3011 (build-system gnu-build-system)
3012 (inputs
3013 `(("boost" ,boost)
3014 ("openssl" ,openssl)))
3015 (arguments
3016 `(#:configure-flags
3017 (list
3018 (string-append "--with-boost=" (assoc-ref %build-inputs "boost"))
3019 (string-append "--with-openssl=" (assoc-ref %build-inputs "openssl")))))
3020 (home-page "https://think-async.com/Asio")
3021 (synopsis "C++ library for ASynchronous network I/O")
3022 (description "Asio is a cross-platform C++ library for network and
3023 low-level I/O programming that provides developers with a consistent
3024 asynchronous model using a modern C++ approach.")
3025 (license license:boost1.0)))
3026
3027 (define-public shadowsocks
3028 ;; There are some security fixes after the last release.
3029 (let* ((commit "e332ec93e9c90f1cbee676b022bf2c5d5b7b1239")
3030 (revision "0")
3031 (version (git-version "2.8.2" revision commit)))
3032 (package
3033 (name "shadowsocks")
3034 (version version)
3035 (home-page "https://github.com/shadowsocks/shadowsocks")
3036 (source (origin
3037 (method git-fetch)
3038 (uri (git-reference
3039 (url home-page)
3040 (commit commit)))
3041 (sha256
3042 (base32
3043 "1idd9b4f2pnhcpk1bh030hqg5zq25gkwxd53xi3c0cj242w7sp2j"))
3044 (file-name (git-file-name name version))))
3045 (inputs
3046 `(("openssl" ,openssl)))
3047 (arguments
3048 '(#:phases
3049 (modify-phases %standard-phases
3050 (add-after 'unpack 'patch-crypto-paths
3051 (lambda* (#:key inputs #:allow-other-keys)
3052 (substitute* "shadowsocks/shell.py"
3053 (("config\\.get\\('libopenssl', None\\)")
3054 (format #f "config.get('libopenssl', ~s)"
3055 (string-append
3056 (assoc-ref inputs "openssl")
3057 "/lib/libssl.so")))))))))
3058 (build-system python-build-system)
3059 (synopsis "Fast tunnel proxy that helps you bypass firewalls")
3060 (description
3061 "This package is a fast tunnel proxy that helps you bypass firewalls.
3062
3063 Features:
3064 @itemize
3065 @item TCP & UDP support
3066 @item User management API
3067 @item TCP Fast Open
3068 @item Workers and graceful restart
3069 @item Destination IP blacklist
3070 @end itemize")
3071 (license license:asl2.0))))
3072
3073 (define-public net-snmp
3074 (package
3075 (name "net-snmp")
3076 (version "5.9")
3077 (source (origin
3078 (method url-fetch)
3079 (uri (string-append "mirror://sourceforge/net-snmp/net-snmp/"
3080 version "/net-snmp-" version ".tar.gz"))
3081 (sha256
3082 (base32
3083 "0wb0vyafpspw3mcifkjjmf17r1r80kjvslycscb8nvaxz1k3lc04"))
3084 (modules '((guix build utils)))
3085 (snippet
3086 '(begin
3087 ;; Drop bundled libraries.
3088 (delete-file-recursively "snmplib/openssl")
3089 #t))))
3090 (build-system gnu-build-system)
3091 (arguments
3092 `(#:test-target "test"
3093 ;; XXX: With parallel build enabled, Perl modules may not get linked with
3094 ;; libnetsnmp. See e.g. <https://bugzilla.novell.com/show_bug.cgi?id=819497>.
3095 #:parallel-build? #f
3096 #:configure-flags
3097 (list (string-append "LDFLAGS=-Wl,-rpath="
3098 (assoc-ref %outputs "out")
3099 "/lib")
3100 "--with-logfile=/var/log/snmpd.log"
3101 (string-append "--with-openssl="
3102 (assoc-ref %build-inputs "openssl")))
3103 #:phases
3104 (modify-phases %standard-phases
3105 (add-after 'unpack 'patch-tests
3106 (lambda* (#:key inputs #:allow-other-keys)
3107 (substitute* "testing/fulltests/support/simple_TESTCONF.sh"
3108 (("NETSTAT=\"\"")
3109 (string-append "NETSTAT=\"" (which "netstat") "\"")))
3110 (substitute* '("testing/fulltests/default/T065agentextend_simple"
3111 "testing/fulltests/default/T115agentxperl_simple")
3112 (("/usr/bin/env") (which "env")))
3113 (substitute* "testing/fulltests/default/T065agentextend_sh_simple"
3114 (("/bin/sh") (which "sh")))
3115 ;; These tests require network access.
3116 (for-each delete-file
3117 '("testing/fulltests/default/T070com2sec_simple"
3118 "testing/fulltests/default/T071com2sec6_simple"))
3119 #t))
3120 (add-after 'unpack 'patch-Makefile.PL
3121 (lambda* (#:key outputs #:allow-other-keys)
3122 (substitute* "Makefile.in"
3123 (("Makefile.PL -NET")
3124 (string-append "Makefile.PL PREFIX="
3125 (assoc-ref outputs "out")
3126 " INSTALLDIRS=site" " NO_PERLLOCAL=1"
3127 " -NET")))
3128 #t)))))
3129 (inputs
3130 `(("libnl" ,libnl)
3131 ("ncurses" ,ncurses) ; for the ‘apps’
3132 ("openssl" ,openssl)
3133 ("perl" ,perl)))
3134 (native-inputs
3135 `(("pkg-config" ,pkg-config)
3136
3137 ;; For tests only.
3138 ("net-tools" ,net-tools)
3139 ("coreutils" ,coreutils)
3140 ("grep" ,grep)))
3141 (home-page "http://www.net-snmp.org/")
3142 (synopsis "Simple Network Management Protocol library and tools")
3143 (description "The @dfn{Simple Network Management Protocol} (SNMP) is a
3144 widely used protocol for monitoring the health and welfare of network
3145 equipment (e.g. routers), computer equipment and even devices like UPSs.
3146 Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and
3147 SNMP v3 using both IPv4 and IPv6.")
3148 ;; This only affects OpenBSD
3149 ;; https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8100
3150 (properties `((lint-hidden-cve . ("CVE-2015-8100"))))
3151 (license (list license:bsd-3
3152 (license:non-copyleft
3153 "http://www.net-snmp.org/about/license.html"
3154 "CMU/UCD copyright notice")))))
3155
3156 (define-public ubridge
3157 (package
3158 (name "ubridge")
3159 (version "0.9.18")
3160 (source
3161 (origin
3162 (method git-fetch)
3163 (uri (git-reference
3164 (url "https://github.com/GNS3/ubridge")
3165 (commit (string-append "v" version))))
3166 (file-name (git-file-name name version))
3167 (sha256
3168 (base32 "0jg66jhhpv4c9340fsdp64hf9h253i8r81fknxa0gq241ripp3jn"))))
3169 (build-system gnu-build-system)
3170 (arguments
3171 `(#:tests? #f ; no tests
3172 #:make-flags
3173 (list ,(string-append "CC=" (cc-for-target)))
3174 #:phases
3175 (modify-phases %standard-phases
3176 (delete 'configure) ; no configure script
3177 (add-before 'install 'set-bindir
3178 (lambda* (#:key inputs outputs #:allow-other-keys)
3179 (let ((bin (string-append (assoc-ref outputs "out")
3180 "/bin")))
3181 (mkdir-p bin)
3182 (substitute* "Makefile"
3183 (("\\$\\(BINDIR\\)") bin)
3184 (("\tsetcap cap_net.*$") "")))
3185 #t)))))
3186 (inputs
3187 `(("libpcap" ,libpcap)))
3188 (home-page "https://github.com/GNS3/ubridge/")
3189 (synopsis "Bridge for UDP tunnels, Ethernet, TAP and VMnet interfaces")
3190 (description "uBridge is a simple program to create user-land bridges
3191 between various technologies. Currently, bridging between UDP tunnels,
3192 Ethernet and TAP interfaces is supported. Packet capture is also supported.")
3193 (license license:gpl3+)))
3194
3195 (define-public hcxtools
3196 (package
3197 (name "hcxtools")
3198 (version "5.2.0")
3199 (source
3200 (origin
3201 (method git-fetch)
3202 (uri (git-reference
3203 (url "https://github.com/ZerBea/hcxtools")
3204 (commit version)))
3205 (sha256
3206 (base32 "0k2qlq9hz5zc21nyc6yrnfqzga7hydn5mm0x3rpl2fhkwl81lxcn"))
3207 (file-name (git-file-name name version))))
3208 (build-system gnu-build-system)
3209 (inputs
3210 `(("curl" ,curl)
3211 ("libpcap" ,libpcap)
3212 ("openssl" ,openssl)
3213 ("zlib" ,zlib)))
3214 (arguments
3215 `(#:make-flags
3216 (list "CC=gcc"
3217 (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
3218 #:tests? #f ; no test suite
3219 #:phases
3220 (modify-phases %standard-phases
3221 (delete 'configure))))
3222 (home-page "https://github.com/ZerBea/hcxtools")
3223 (synopsis "Capture wlan traffic to hashcat and John the Ripper")
3224 (description
3225 "This package contains a small set of tools to capture and convert
3226 packets from wireless devices for use with hashcat or John the Ripper.")
3227 (license license:expat)))
3228
3229 (define-public hcxdumptool
3230 (package
3231 (name "hcxdumptool")
3232 (version "6.0.6")
3233 (source
3234 (origin
3235 (method git-fetch)
3236 (uri (git-reference
3237 (url "https://github.com/ZerBea/hcxdumptool")
3238 (commit version)))
3239 (sha256
3240 (base32 "1b4d543y64ib92w9gcmiyjn5hz2vyjqmxk3f3yr1zk04fhw16gmf"))
3241 (file-name (git-file-name name version))))
3242 (build-system gnu-build-system)
3243 (arguments
3244 `(#:make-flags
3245 (list ,(string-append "CC=" (cc-for-target))
3246 (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
3247 #:tests? #f ; no test suite
3248 #:phases
3249 (modify-phases %standard-phases
3250 (delete 'configure))))
3251 (inputs
3252 `(("openssl" ,openssl)))
3253 (home-page "https://github.com/ZerBea/hcxdumptool")
3254 (synopsis "Small tool to capture packets from wlan devices")
3255 (description
3256 "Small tool to capture packets from WLAN devices. After capturing,
3257 upload the \"uncleaned\" cap to @url{https://wpa-sec.stanev.org/?submit} to
3258 see if the access point or the client is vulnerable to a dictionary attack.
3259 Convert the cap file to hccapx format and/or to WPA-PMKID-PBKDF2
3260 hashline (16800) with @command{hcxpcaptool} from the @code{hcxtools} package
3261 and check if the WLAN key or the master key was transmitted unencrypted.")
3262 (license license:expat)))
3263
3264 (define-public dante
3265 (package
3266 (name "dante")
3267 (version "1.4.2")
3268 (source
3269 (origin
3270 (method url-fetch)
3271 (uri (string-append "https://www.inet.no/dante/files/dante-"
3272 version ".tar.gz"))
3273 (sha256
3274 (base32
3275 "19rqzj167q73ag20zxpvswhkk0bj56r5maf83v5016sw7vrcz5sc"))))
3276 (build-system gnu-build-system)
3277 (arguments
3278 ;; XXX: The dynamic socks library doesn't work with 'libc.so' (GNU ld
3279 ;; script). When preloading is enabled, 'sockd' failed with:
3280 ;; … Failed to open library "libc.so": …: invalid ELF header
3281 '(#:configure-flags '("--disable-preload")))
3282 (home-page "https://www.inet.no/dante/")
3283 (synopsis "SOCKS server and client")
3284 (description "Dante is a SOCKS client and server implementation. It can
3285 be installed on a machine with access to an external TCP/IP network and will
3286 allow all other machines, without direct access to that network, to be relayed
3287 through the machine the Dante server is running on. The external network will
3288 never see any machines other than the one Dante is running on.")
3289 (license (license:non-copyleft "file://LICENSE"))))
3290
3291 (define-public restbed
3292 (let ((commit "6eb385fa9051203f28bf96cc1844bbb5a9a6481f"))
3293 (package
3294 (name "restbed")
3295 (version (git-version "4.6" "1" commit))
3296 (source
3297 (origin
3298 (method git-fetch)
3299 (uri (git-reference
3300 (url "https://github.com/Corvusoft/restbed/")
3301 (commit commit)))
3302 (file-name (string-append name "-" version ".tar.gz"))
3303 (sha256
3304 (base32 "0k60i5drklqqrb4khb25fzkgz9y0sncxf1sp6lh2bm1m0gh0661n"))))
3305 (build-system cmake-build-system)
3306 (inputs
3307 `(("asio" ,asio)
3308 ("catch" ,catch-framework)
3309 ("openssl" ,openssl)))
3310 (arguments
3311 `(#:tests? #f
3312 #:configure-flags
3313 '("-DBUILD_TESTS=NO"
3314 "-DBUILD_EXAMPLES=NO"
3315 "-DBUILD_SSL=NO"
3316 "-DBUILD_SHARED=NO")
3317 #:phases
3318 (modify-phases %standard-phases
3319 (add-after 'unpack 'apply-patches-and-fix-paths
3320 (lambda* (#:key inputs #:allow-other-keys)
3321 (let ((asio (assoc-ref inputs "asio"))
3322 (catch (assoc-ref inputs "catch"))
3323 (openssl (assoc-ref inputs "openssl")))
3324 (substitute* "cmake/Findasio.cmake"
3325 (("(find_path\\( asio_INCLUDE asio\\.hpp HINTS ).*$" all begin)
3326 (string-append begin " \"" asio "/include\" )")))
3327 (substitute* "cmake/Findcatch.cmake"
3328 (("(find_path\\( catch_INCLUDE catch\\.hpp HINTS ).*$" all begin)
3329 (string-append begin " \"" catch "/include\" )")))
3330 (substitute* "cmake/Findopenssl.cmake"
3331 (("(find_library\\( ssl_LIBRARY ssl ssleay32 HINTS ).*$" all begin)
3332 (string-append begin " \"" openssl "/lib\" )"))
3333 (("(find_library\\( crypto_LIBRARY crypto libeay32 HINTS ).*$" all begin)
3334 (string-append begin " \"" openssl "/lib\" )"))
3335 (("(find_path\\( ssl_INCLUDE openssl/ssl\\.h HINTS ).*$" all begin)
3336 (string-append begin " \"" openssl "/include\" )")))))))))
3337 (synopsis "Asynchronous RESTful functionality to C++11 applications")
3338 (description "Restbed is a comprehensive and consistent programming
3339 model for building applications that require seamless and secure
3340 communication over HTTP.")
3341 (home-page "https://github.com/Corvusoft/restbed")
3342 (license license:agpl3+))))
3343
3344 (define-public restinio
3345 (package
3346 (name "restinio")
3347 (version "0.6.1.1")
3348 (source (origin
3349 (method git-fetch)
3350 (uri (git-reference
3351 (url "https://github.com/Stiffstream/restinio")
3352 (commit (string-append "v." version))))
3353 (file-name (git-file-name name version))
3354 (sha256
3355 (base32
3356 "141a96hx8zhcdv121g6cs91n46kb47y040v25pnvz5f54964z7f5"))))
3357 (build-system cmake-build-system)
3358 (inputs ; TODO: Need to force-keep references on some inputs, e.g. boost.
3359 `(("zlib" ,zlib)
3360 ("catch2" ,catch-framework2)
3361 ("openssl" ,openssl)
3362 ("boost" ,boost)
3363 ("pcre" ,pcre)
3364 ("pcre2" ,pcre2)
3365 ("sobjectizer" ,sobjectizer)))
3366 (propagated-inputs
3367 `(("asio" ,asio)
3368 ("fmt" ,fmt)
3369 ("http-parser" ,http-parser)))
3370 (arguments
3371 `(#:configure-flags '("-DRESTINIO_INSTALL=on")
3372 #:tests? #f ; TODO: The tests are called from the root CMakelist, need RESTINIO_TEST=on.
3373 #:phases
3374 (modify-phases %standard-phases
3375 (add-after 'unpack 'change-directory
3376 (lambda _
3377 (chdir "dev/restinio")
3378 #t)))))
3379 (home-page "https://stiffstream.com/en/products/restinio.html")
3380 (synopsis "C++14 library that gives you an embedded HTTP/Websocket server")
3381 (description "RESTinio is a header-only C++14 library that gives you an embedded
3382 HTTP/Websocket server. It is based on standalone version of ASIO
3383 and targeted primarily for asynchronous processing of HTTP-requests.")
3384 (license license:bsd-3)))
3385
3386 (define-public opendht
3387 (package
3388 (name "opendht")
3389 (version "2.1.4")
3390 (source (origin
3391 (method git-fetch)
3392 (uri (git-reference
3393 (url "https://github.com/savoirfairelinux/opendht")
3394 (commit version)))
3395 (file-name (git-file-name name version))
3396 (patches (search-patches "opendht-fix-jami.patch"))
3397 (sha256
3398 (base32
3399 "1ax26ri1ifb6s8ppd28jmanka9yf8mw3np65q2h4djhhik0phhal"))))
3400 ;; Since 2.0, the gnu-build-system does not seem to work anymore, upstream bug?
3401 (build-system cmake-build-system)
3402 (inputs
3403 `(("argon2" ,argon2)
3404 ("nettle" ,nettle)
3405 ("readline" ,readline)
3406 ("jsoncpp" ,jsoncpp)
3407 ("openssl" ,openssl) ;required for the DHT proxy
3408 ("fmt" ,fmt)))
3409 (propagated-inputs
3410 `(("gnutls" ,gnutls) ;included in opendht/crypto.h
3411 ("msgpack" ,msgpack))) ;included in several installed headers
3412 (native-inputs
3413 `(("autoconf" ,autoconf)
3414 ("automake" ,automake)
3415 ("pkg-config" ,pkg-config)
3416 ("restinio" ,restinio) ;headers only library
3417 ("libtool" ,libtool)
3418 ("cppunit" ,cppunit)))
3419 (arguments
3420 `(#:tests? #f ; Tests require network connection.
3421 #:configure-flags
3422 '(;; "-DOPENDHT_TESTS=on"
3423 "-DOPENDHT_TOOLS=off"
3424 "-DOPENDHT_PYTHON=off"
3425 "-DOPENDHT_PROXY_SERVER=on"
3426 "-DOPENDHT_PUSH_NOTIFICATIONS=on"
3427 "-DOPENDHT_PROXY_SERVER_IDENTITY=on"
3428 "-DOPENDHT_PROXY_CLIENT=on")))
3429 (home-page "https://github.com/savoirfairelinux/opendht/")
3430 (synopsis "Distributed Hash Table (DHT) library")
3431 (description "OpenDHT is a Distributed Hash Table (DHT) library. It may
3432 be used to manage peer-to-peer network connections as needed for real time
3433 communication.")
3434 (license license:gpl3+)))
3435
3436 (define-public frrouting
3437 (package
3438 (name "frrouting")
3439 (version "7.5")
3440 (source (origin
3441 (method url-fetch)
3442 (uri (string-append "https://github.com/FRRouting/frr/releases/"
3443 "download/frr-" version "/frr-" version
3444 ".tar.xz"))
3445 (sha256
3446 (base32
3447 "1a27wvxmc51sr0kchy0hjfpv19imlgrr3s9k48lik9k01g71yrdr"))))
3448 (build-system gnu-build-system)
3449 (inputs
3450 `(("c-ares" ,c-ares)
3451 ("json-c" ,json-c)
3452 ("libcap" ,libcap)
3453 ("libyang" ,libyang)
3454 ("readline" ,readline)))
3455 (native-inputs
3456 `(("perl" ,perl)
3457 ("pkg-config" ,pkg-config)
3458 ("python" ,python-wrapper)
3459 ("python-pytest" ,python-pytest)))
3460 (home-page "https://frrouting.org/")
3461 (synopsis "IP routing protocol suite")
3462 (description "FRRouting (FRR) is an IP routing protocol suite which includes
3463 protocol daemons for BGP, IS-IS, LDP, OSPF, PIM, and RIP. ")
3464 (license license:gpl2+)))
3465
3466 (define-public iwd
3467 (package
3468 (name "iwd")
3469 (version "0.21")
3470 (source (origin
3471 (method git-fetch)
3472 (uri (git-reference
3473 (url "https://git.kernel.org/pub/scm/network/wireless/iwd.git")
3474 (commit version)))
3475 (file-name (git-file-name name version))
3476 (sha256
3477 (base32
3478 "001dikinsa6kshwscjbvwipavzwpqnpvx9fpshcn63gbvbhyd393"))))
3479 (build-system gnu-build-system)
3480 (inputs
3481 `(("dbus" ,dbus)
3482 ("ell" ,ell)
3483 ("readline" ,readline)))
3484 (native-inputs
3485 `(("asciidoc" ,asciidoc)
3486 ("autoconf" ,autoconf)
3487 ("automake" ,automake)
3488 ("libtool" ,libtool)
3489 ("pkgconfig" ,pkg-config)
3490 ("python" ,python)
3491 ("openssl" ,openssl)))
3492 (arguments
3493 `(#:configure-flags
3494 (let ((dbus (assoc-ref %outputs "out")))
3495 (list "--disable-systemd-service"
3496 "--enable-external-ell"
3497 "--enable-hwsim"
3498 "--enable-tools"
3499 "--enable-wired"
3500 "--enable-docs"
3501 "--localstatedir=/var"
3502 (string-append "--with-dbus-datadir=" dbus "/share/")
3503 (string-append "--with-dbus-busdir="
3504 dbus "/share/dbus-1/system-services")))
3505 #:phases
3506 (modify-phases %standard-phases
3507 (add-before 'bootstrap 'pre-bootstrap
3508 (lambda _
3509 (substitute* "Makefile.am"
3510 ;; Test disabled because it needs the kernel module
3511 ;; 'pkcs8_key_parser' loaded.
3512 (("unit\\/test-eapol.*? ") "")
3513 ;; Don't try to 'mkdir /var'.
3514 (("\\$\\(MKDIR_P\\) -m 700") "true"))
3515 #t)))))
3516 (home-page "https://git.kernel.org/pub/scm/network/wireless/iwd.git/")
3517 (synopsis "Internet Wireless Daemon")
3518 (description "iwd is a wireless daemon for Linux that aims to replace WPA
3519 Supplicant. It optimizes resource utilization by not depending on any external
3520 libraries and instead utilizing features provided by the Linux kernel to the
3521 maximum extent possible.")
3522 (license license:lgpl2.1+)))
3523
3524 (define-public libyang
3525 (package
3526 (name "libyang")
3527 (version "1.0.215")
3528 (source (origin
3529 (method git-fetch)
3530 (uri (git-reference
3531 (url "https://github.com/CESNET/libyang")
3532 (commit (string-append "v" version))))
3533 (file-name (git-file-name name version))
3534 (sha256
3535 (base32
3536 "0mrs2ppmq77z8sbqgm2w0rl9bfgybd6bcxanakfww4chih6cy0dw"))))
3537 (build-system cmake-build-system)
3538 (arguments
3539 `(#:configure-flags
3540 (list "-DENABLE_BUILD_TESTS=ON" "-DENABLE_LYD_PRIV=ON")))
3541 (propagated-inputs `(("pcre" ,pcre)))
3542 (native-inputs `(("cmocka" ,cmocka)
3543 ("pkg-config" ,pkg-config)))
3544 (home-page "https://github.com/CESNET/libyang")
3545 (synopsis "YANG data modelling language library")
3546 (description "libyang is a YANG data modelling language parser and toolkit
3547 written (and providing API) in C. Current implementation covers YANG 1.0 (RFC
3548 6020) as well as YANG 1.1 (RFC 7950).")
3549 (license license:bsd-3)))
3550
3551 (define-public batctl
3552 (package
3553 (name "batctl")
3554 (version "2020.4")
3555 (source
3556 (origin
3557 (method url-fetch)
3558 (uri (string-append "https://downloads.open-mesh.org/batman/releases/batman-adv-"
3559 version "/batctl-" version ".tar.gz"))
3560 (sha256
3561 (base32 "05rrpfbpdhxn5zgdps849qls2ifis6a94cjryb60d4y1nc2n0d7w"))))
3562 (inputs
3563 `(("libnl" ,libnl)))
3564 (native-inputs
3565 `(("pkg-config" ,pkg-config)))
3566 (build-system gnu-build-system)
3567 (arguments
3568 `(#:tests? #f
3569 ;; Batctl only has a makefile. Thus we disable tests and
3570 ;; configuration, passing in a few make-flags.
3571 #:phases (modify-phases %standard-phases (delete 'configure))
3572 #:make-flags
3573 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3574 (string-append "PKG_CONFIG=" (assoc-ref %build-inputs "pkg-config")
3575 "/bin/pkg-config")
3576 "CC=gcc")))
3577 (home-page "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki")
3578 (synopsis "Management tool for the mesh networking BATMAN protocol")
3579 (description "This package provides a control tool for the
3580 B.A.T.M.A.N. mesh networking routing protocol provided by the Linux kernel
3581 module @code{batman-adv}, for Layer 2.")
3582 (license license:gpl2+)))
3583
3584 (define-public pagekite
3585 (package
3586 (name "pagekite")
3587 (version "1.5.2.200725")
3588 (source
3589 (origin
3590 (method git-fetch)
3591 (uri (git-reference
3592 (url "https://github.com/pagekite/PyPagekite")
3593 (commit (string-append "v" version))))
3594 (file-name (git-file-name name version))
3595 (sha256
3596 (base32 "0lig1i42bn9isw848vnml5qhcaa04x1dr2hb075bm0a3439kv3rr"))))
3597 (build-system python-build-system)
3598 (arguments
3599 `(#:phases
3600 (modify-phases %standard-phases
3601 (add-after 'install 'install-man-page
3602 (lambda* (#:key inputs outputs #:allow-other-keys)
3603 (let* ((out (assoc-ref outputs "out"))
3604 (man (string-append out "/share/man")))
3605 (invoke "make"
3606 (string-append "PYTHONPATH=" (getenv "PYTHONPATH"))
3607 "doc/pagekite.1")
3608 (install-file "doc/pagekite.1" (string-append man "/man1"))
3609 #t))))))
3610 (inputs
3611 `(("python-six" ,python-six)
3612 ("python-socksipychain" ,python-socksipychain)))
3613 (home-page "https://pagekite.net/")
3614 (synopsis "Make localhost servers publicly visible")
3615 (description
3616 "PageKite implements a tunneled reverse proxy which makes it easy to make
3617 a service (such as an HTTP or SSH server) on localhost visible to the wider
3618 Internet, even behind NAT or restrictive firewalls. A managed front-end relay
3619 service is available at @url{https://pagekite.net/}, or you can run your own.")
3620 (license license:agpl3+)))
3621
3622 (define-public ipcalc
3623 (package
3624 (name "ipcalc")
3625 (version "0.41")
3626 (source (origin
3627 (method url-fetch)
3628 (uri (string-append "http://jodies.de/ipcalc-archive/"
3629 name "-" version ".tar.gz"))
3630 (sha256
3631 (base32
3632 "12if9sm8h2ac0pgwkw835cgyqjxm6h27k4kfn2vfas9krrqwbafx"))))
3633 (inputs `(("perl" ,perl)
3634 ("tar" ,tar)
3635 ("gzip" ,gzip)
3636 ("tarball" ,source)))
3637 (build-system trivial-build-system) ;no Makefile.PL
3638 (arguments
3639 `(#:modules ((guix build utils))
3640 #:builder
3641 (begin
3642 (use-modules (guix build utils))
3643 (use-modules (srfi srfi-1))
3644 (let* ((source (assoc-ref %build-inputs "source"))
3645 (perl (string-append (assoc-ref %build-inputs "perl")
3646 "/bin"))
3647 (tar (assoc-ref %build-inputs "tar"))
3648 (gz (assoc-ref %build-inputs "gzip"))
3649 (out (assoc-ref %outputs "out"))
3650 (bin (string-append out "/bin"))
3651 (doc (string-append out "/share/doc/ipcalc")))
3652 (setenv "PATH" (string-append gz "/bin"))
3653 (invoke (string-append tar "/bin/tar") "xvf" source)
3654 (chdir (string-append ,name "-" ,version))
3655
3656 (install-file "ipcalc" bin)
3657 (patch-shebang (string-append bin "/ipcalc") (list perl))
3658 #t))))
3659 (synopsis "Simple IP network calculator")
3660 (description "ipcalc takes an IP address and netmask and calculates the
3661 resulting broadcast, network, Cisco wildcard mask, and host range. By giving
3662 a second netmask, you can design subnets and supernets. It is also intended
3663 to be a teaching tool and presents the subnetting results as
3664 easy-to-understand binary values.")
3665 (home-page "http://jodies.de/ipcalc")
3666 (license license:gpl2+)))
3667
3668 (define-public tunctl
3669 (package
3670 (name "tunctl")
3671 (version "1.5")
3672 (source
3673 (origin
3674 (method url-fetch)
3675 (uri (string-append "mirror://sourceforge/tunctl/tunctl/" version "/"
3676 "tunctl-" version ".tar.gz"))
3677 (sha256
3678 (base32 "1zsgn7w6l2zh2q0j6qaw8wsx981qcr536qlz1lgb3b5zqr66qama"))))
3679 (build-system gnu-build-system)
3680 (arguments
3681 `(#:phases
3682 (modify-phases %standard-phases
3683 (delete 'bootstrap) ;there is no configure.ac file
3684 (delete 'configure) ;there is no configure script
3685 (delete 'check) ;there are no tests
3686 (replace 'build
3687 (lambda _
3688 (setenv "CC" "gcc")
3689 (invoke "make" "tunctl")))
3690 ;; TODO: Requires docbook2x to generate man page from SGML.
3691 (replace 'install
3692 (lambda* (#:key outputs #:allow-other-keys)
3693 (let* ((out (assoc-ref outputs "out"))
3694 (bin (string-append out "/bin")))
3695 (install-file "tunctl" bin))
3696 #t)))))
3697 (home-page "http://tunctl.sourceforge.net")
3698 (synopsis "Utility to set up and maintain TUN/TAP network interfaces")
3699 (description "Tunctl is used to set up and maintain persistent TUN/TAP
3700 network interfaces, enabling user applications to simulate network traffic.
3701 Such interfaces are useful for VPN software, virtualization, emulation,
3702 simulation, and a number of other applications.")
3703 (license license:gpl2)))
3704
3705 (define-public wol
3706 (package
3707 (name "wol")
3708 (version "0.7.1")
3709 (source
3710 (origin
3711 (method url-fetch)
3712 (uri (string-append "mirror://sourceforge/wake-on-lan/wol/"
3713 version "/wol-" version ".tar.gz"))
3714 (sha256
3715 (base32 "08i6l5lr14mh4n3qbmx6kyx7vjqvzdnh3j9yfvgjppqik2dnq270"))))
3716 (build-system gnu-build-system)
3717 (home-page "https://sourceforge.net/projects/wake-on-lan/")
3718 (synopsis "Implements Wake On LAN functionality in a small program")
3719 (description "Tool to send a magic packet to wake another host on the
3720 network. This must be enabled on the target host, usually in the BIOS.")
3721 (license license:gpl2)))
3722
3723 (define-public vde2
3724 (package
3725 (name "vde2")
3726 (version "2.3.2")
3727 (source
3728 (origin
3729 (method url-fetch)
3730 (uri "mirror://sourceforge/vde/vde2/2.3.2/vde2-2.3.2.tar.gz")
3731 (sha256
3732 (base32 "14xga0ib6p1wrv3hkl4sa89yzjxv7f1vfqaxsch87j6scdm59pr2"))))
3733 (build-system gnu-build-system)
3734 (arguments
3735 `(#:parallel-build? #f)) ; Build fails if #t.
3736 (inputs
3737 `(("python" ,python)
3738 ("libpcap" ,libpcap)
3739 ("openssl" ,openssl-1.0))) ; Build fails with 1.1.
3740 (home-page "https://github.com/virtualsquare/vde-2")
3741 (synopsis "Virtual Distributed Ethernet")
3742 (description "VDE is a set of programs to provide virtual software-defined
3743 Ethernet network interface controllers across multiple virtual or
3744 physical, local or remote devices. The VDE architecture provides
3745 virtual counterparts to hardware components such as switches and
3746 cables.")
3747 (license (list license:gpl2
3748 license:lgpl2.1 ; libvdeplug
3749 (license:non-copyleft ; slirpvde
3750 "file://COPYING.slirpvde"
3751 "See COPYING.slirpvde in the distribution.")))))
3752
3753 (define-public haproxy
3754 (package
3755 (name "haproxy")
3756 (version "2.1.7")
3757 (source (origin
3758 (method url-fetch)
3759 (uri (string-append "https://www.haproxy.org/download/"
3760 (version-major+minor version)
3761 "/src/haproxy-" version ".tar.gz"))
3762 (sha256
3763 (base32
3764 "0fd3c1znid5a9w3gcf77b85hm2a2558w9s02c4b7xzkmivqnqbir"))))
3765 (build-system gnu-build-system)
3766 (arguments
3767 `(#:make-flags
3768 (let* ((out (assoc-ref %outputs "out")))
3769 (list (string-append "PREFIX=" out)
3770 (string-append "DOCDIR=" out "/share/" ,name)
3771 "TARGET=linux-glibc"
3772 "USE_LUA=1"
3773 "USE_OPENSSL=1"
3774 "USE_ZLIB=1"
3775 "USE_PCRE_2=1"))
3776 #:tests? #f ; there are only regression tests, using varnishtest
3777 #:phases
3778 (modify-phases %standard-phases
3779 (delete 'configure))))
3780 (inputs
3781 `(("lua" ,lua)
3782 ("openssl" ,openssl)
3783 ("pcre2" ,pcre2)
3784 ("zlib" ,zlib)))
3785 (home-page "https://www.haproxy.org/")
3786 (synopsis "Reliable, high performance TCP/HTTP load balancer")
3787 (description "HAProxy is a free, very fast and reliable solution offering
3788 high availability, load balancing, and proxying for TCP and HTTP-based
3789 applications. It is particularly suited for web sites crawling under very
3790 high loads while needing persistence or Layer7 processing. Supporting tens of
3791 thousands of connections is clearly realistic with today's hardware.")
3792 (license (list license:gpl2+
3793 license:lgpl2.1
3794 license:lgpl2.1+))))
3795
3796 (define-public lldpd
3797 (package
3798 (name "lldpd")
3799 (version "1.0.8")
3800 (source
3801 (origin
3802 (method url-fetch)
3803 (uri (string-append "https://media.luffy.cx/files/lldpd/lldpd-"
3804 version ".tar.gz"))
3805 (sha256
3806 (base32 "1vrxr8lgkw7q6ixaaili6ac7i0j0326194s498n2dxihdvkh1llq"))
3807 (modules '((guix build utils)))
3808 (snippet
3809 '(begin
3810 ;; Drop bundled library.
3811 (delete-file-recursively "libevent")
3812 #t))))
3813 (arguments
3814 `(#:configure-flags
3815 (list
3816 "--with-privsep-user=nobody"
3817 "--with-privsep-group=nogroup"
3818 "--localstatedir=/var"
3819 "--enable-pie"
3820 "--disable-static"
3821 "--without-embedded-libevent"
3822 (string-append "--with-systemdsystemunitdir="
3823 (assoc-ref %outputs "out")
3824 "/lib/systemd/system"))))
3825 (build-system gnu-build-system)
3826 (inputs
3827 `(("libevent" ,libevent)
3828 ("libxml2" ,libxml2)
3829 ("openssl" ,openssl)
3830 ("readline" ,readline)))
3831 (native-inputs
3832 `(("pkg-config" ,pkg-config)))
3833 (home-page "https://vincentbernat.github.io/lldpd/")
3834 (synopsis "Locate neighbors of your network equipment")
3835 (description
3836 "The @dfn{Link Layer Discovery Protocol} (LLDP) is an industry standard
3837 protocol designed to supplant proprietary Link-Layer protocols such as EDP or
3838 CDP. The goal of LLDP is to provide an inter-vendor compatible mechanism to
3839 deliver Link-Layer notifications to adjacent network devices. @code{lldpd} is
3840 an implementation of LLDP. It also supports some proprietary protocols.")
3841 (license license:isc)))
3842
3843 (define-public hashcash
3844 (package
3845 (name "hashcash")
3846 (version "1.22")
3847 (source
3848 (origin
3849 (method url-fetch)
3850 (uri (string-append "http://www.hashcash.org/source/hashcash-"
3851 version ".tgz"))
3852 (sha256
3853 (base32
3854 "15kqaimwb2y8wvzpn73021bvay9mz1gqqfc40gk4hj6f84nz34h1"))))
3855 (build-system gnu-build-system)
3856 (arguments
3857 `(#:make-flags (list (string-append "CC=" ,(cc-for-target)))
3858 #:phases
3859 (modify-phases %standard-phases
3860 (delete 'configure)
3861 ;; No tests available.
3862 (delete 'check)
3863 (replace 'install
3864 (lambda* (#:key outputs #:allow-other-keys)
3865 (let* ((outdir (assoc-ref outputs "out"))
3866 (bindir (string-append outdir "/bin"))
3867 (mandir (string-append outdir "/share/man/man1"))
3868 (docdir (string-append outdir "/share/doc/hashcash-" ,version)))
3869 ;; Install manually, as we don't need the `sha1' binary
3870 (install-file "hashcash" bindir)
3871 (install-file "hashcash.1" mandir)
3872 (install-file "README" docdir)
3873 (install-file "LICENSE" docdir)
3874 (install-file "CHANGELOG" docdir)
3875 #t))))))
3876 (home-page "https://www.hashcash.org/")
3877 (synopsis "Denial-of-service countermeasure")
3878 (description "Hashcash is a proof-of-work algorithm, which has been used
3879 as a denial-of-service countermeasure technique in a number of systems.
3880
3881 A hashcash stamp constitutes a proof-of-work which takes a parametrizable
3882 amount of work to compute for the sender. The recipient can verify received
3883 hashcash stamps efficiently.
3884
3885 This package contains a command-line tool for computing and verifying hashcash
3886 stamps.")
3887 (license license:public-domain)))
3888
3889 (define-public nbd
3890 (package
3891 (name "nbd")
3892 (version "3.21")
3893 (source
3894 (origin
3895 (method url-fetch)
3896 (uri (string-append "mirror://sourceforge/nbd/nbd/" version
3897 "/nbd-" version ".tar.xz"))
3898 (sha256
3899 (base32 "1ydylvvayi4w2d08flji9q03sl7y8hn0c26vsay3nwwikprqls77"))))
3900 (build-system gnu-build-system)
3901 (inputs
3902 `(("glib" ,glib)))
3903 (native-inputs
3904 `(("pkg-config" ,pkg-config)
3905 ("which" ,which)))
3906 (home-page "https://nbd.sourceforge.io/")
3907 (synopsis "NBD client and server")
3908 (description "This package provides the NBD (Network Block Devices)
3909 client and server. It allows you to use remote block devices over a TCP/IP
3910 network.")
3911 (license license:gpl2)))
3912
3913 (define-public yggdrasil
3914 (package
3915 (name "yggdrasil")
3916 (version "0.3.15")
3917 (source
3918 (origin
3919 (method git-fetch)
3920 (uri
3921 (git-reference
3922 (url "https://github.com/yggdrasil-network/yggdrasil-go")
3923 (commit (string-append "v" version))
3924 (recursive? #t)))
3925 (file-name (git-file-name name version))
3926 (sha256
3927 (base32
3928 "0gk7gy8yq5nrnblv4imxzzm2hac4ri0hlw19ajfbc1zll5kj32gf"))
3929 (patches (search-patches "yggdrasil-extra-config.patch"))))
3930 (build-system go-build-system)
3931 (arguments
3932 '(#:import-path "github.com/yggdrasil-network/yggdrasil-go"
3933 ;; TODO: figure out how tests are run
3934 #:tests? #f
3935 #:install-source? #f
3936 #:phases (modify-phases %standard-phases
3937 (replace 'build
3938 (lambda _
3939 (for-each
3940 (lambda (c)
3941 (invoke
3942 "go" "build" "-v" "-ldflags=-s -w"
3943 (string-append
3944 "github.com/yggdrasil-network/yggdrasil-go/cmd/" c)))
3945 (list "yggdrasil" "yggdrasilctl"))
3946 #t))
3947 (replace 'install
3948 (lambda* (#:key outputs #:allow-other-keys)
3949 (let* ((out (assoc-ref outputs "out"))
3950 (bin (string-append out "/bin/"))
3951 (doc (string-append out "/share/doc/yggdrasil/")))
3952 (mkdir-p bin)
3953 (for-each
3954 (lambda (f)
3955 (install-file f bin))
3956 (list "yggdrasil" "yggdrasilctl"))
3957 (mkdir-p doc)
3958 (copy-recursively
3959 (string-append
3960 "src/github.com/yggdrasil-network/yggdrasil-go/"
3961 "doc/yggdrasil-network.github.io")
3962 doc))
3963 #t)))))
3964 ;; https://github.com/kardianos/minwinsvc is windows only
3965 (propagated-inputs
3966 `(("go-github-com-arceliar-phony" ,go-github-com-arceliar-phony)
3967 ("go-github-com-cheggaaa-pb" ,go-github-com-cheggaaa-pb)
3968 ("go-github-com-gologme-log" ,go-github-com-gologme-log)
3969 ("go-github-com-hashicorp-go-syslog" ,go-github-com-hashicorp-go-syslog)
3970 ("go-github-com-hjson-hjson-go" ,go-github-com-hjson-hjson-go)
3971 ("go-github-com-kardianos-minwinsvc" ,go-github-com-kardianos-minwinsvc)
3972 ("go-github-com-mitchellh-mapstructure"
3973 ,go-github-com-mitchellh-mapstructure)
3974 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
3975 ("go-golang-org-x-net" ,go-golang-org-x-net)
3976 ("go-golang-org-x-text" ,go-golang-org-x-text)
3977 ("go-golang-zx2c4-com-wireguard" ,go-golang-zx2c4-com-wireguard)
3978 ("go-netlink" ,go-netlink)
3979 ("go-netns" ,go-netns)))
3980 (home-page "https://yggdrasil-network.github.io/blog.html")
3981 (synopsis
3982 "Experiment in scalable routing as an encrypted IPv6 overlay network")
3983 (description
3984 "Yggdrasil is an early-stage implementation of a fully end-to-end encrypted
3985 IPv6 network. It is lightweight, self-arranging, supported on multiple
3986 platforms and allows pretty much any IPv6-capable application to communicate
3987 securely with other Yggdrasil nodes. Yggdrasil does not require you to have
3988 IPv6 Internet connectivity - it also works over IPv4.")
3989 (license
3990 ;; As a special exception to the GNU Lesser General Public License
3991 ;; version 3 ("LGPL3"), the copyright holders of this Library give you
3992 ;; permission to convey to a third party a Combined Work that links
3993 ;; statically or dynamically to this Library without providing any Minimal
3994 ;; Corresponding Source or Minimal Application Code as set out in 4d or
3995 ;; providing the installation information set out in section 4e, provided
3996 ;; that you comply with the other provisions of LGPL3 and provided that you
3997 ;; meet, for the Application the terms and conditions of the license(s)
3998 ;; which apply to the Application. Except as stated in this special
3999 ;; exception, the provisions of LGPL3 will continue to comply in full to
4000 ;; this Library. If you modify this Library, you may apply this exception
4001 ;; to your version of this Library, but you are not obliged to do so. If
4002 ;; you do not wish to do so, delete this exception statement from your
4003 ;; version. This exception does not (and cannot) modify any license terms
4004 ;; which apply to the Application, with which you must still comply
4005 license:lgpl3)))