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