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