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