Merge branch 'staging' into core-updates
[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 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 Nicolas Goaziou <mail@nicolasgoaziou.fr>
10 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
11 ;;; Copyright © 2016, 2017 ng0 <ng0@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 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 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 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 Alex Griffin <a@ajgrf.com>
36 ;;; Copyright © 2019 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 ;;;
40 ;;; This file is part of GNU Guix.
41 ;;;
42 ;;; GNU Guix is free software; you can redistribute it and/or modify it
43 ;;; under the terms of the GNU General Public License as published by
44 ;;; the Free Software Foundation; either version 3 of the License, or (at
45 ;;; your option) any later version.
46 ;;;
47 ;;; GNU Guix is distributed in the hope that it will be useful, but
48 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
49 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50 ;;; GNU General Public License for more details.
51 ;;;
52 ;;; You should have received a copy of the GNU General Public License
53 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
54
55 (define-module (gnu packages networking)
56 #:use-module ((guix licenses) #:prefix license:)
57 #:use-module (guix packages)
58 #:use-module (guix download)
59 #:use-module (guix git-download)
60 #:use-module (guix build-system cmake)
61 #:use-module (guix build-system glib-or-gtk)
62 #:use-module (guix build-system gnu)
63 #:use-module (guix build-system go)
64 #:use-module (guix build-system perl)
65 #:use-module (guix build-system python)
66 #:use-module (guix build-system trivial)
67 #:use-module (gnu packages)
68 #:use-module (gnu packages admin)
69 #:use-module (gnu packages adns)
70 #:use-module (gnu packages algebra)
71 #:use-module (gnu packages audio)
72 #:use-module (gnu packages autotools)
73 #:use-module (gnu packages base)
74 #:use-module (gnu packages bison)
75 #:use-module (gnu packages boost)
76 #:use-module (gnu packages check)
77 #:use-module (gnu packages code)
78 #:use-module (gnu packages compression)
79 #:use-module (gnu packages cpp)
80 #:use-module (gnu packages crypto)
81 #:use-module (gnu packages curl)
82 #:use-module (gnu packages dejagnu)
83 #:use-module (gnu packages documentation)
84 #:use-module (gnu packages flex)
85 #:use-module (gnu packages gettext)
86 #:use-module (gnu packages glib)
87 #:use-module (gnu packages gnome)
88 #:use-module (gnu packages gnupg)
89 #:use-module (gnu packages gtk)
90 #:use-module (gnu packages image)
91 #:use-module (gnu packages libidn)
92 #:use-module (gnu packages linux)
93 #:use-module (gnu packages lua)
94 #:use-module (gnu packages multiprecision)
95 #:use-module (gnu packages kerberos)
96 #:use-module (gnu packages ncurses)
97 #:use-module (gnu packages nettle)
98 #:use-module (gnu packages password-utils)
99 #:use-module (gnu packages pcre)
100 #:use-module (gnu packages perl)
101 #:use-module (gnu packages perl-check)
102 #:use-module (gnu packages pkg-config)
103 #:use-module (gnu packages pretty-print)
104 #:use-module (gnu packages python)
105 #:use-module (gnu packages python-web)
106 #:use-module (gnu packages python-xyz)
107 #:use-module (gnu packages qt)
108 #:use-module (gnu packages readline)
109 #:use-module (gnu packages serialization)
110 #:use-module (gnu packages sqlite)
111 #:use-module (gnu packages ssh)
112 #:use-module (gnu packages textutils)
113 #:use-module (gnu packages tls)
114 #:use-module (gnu packages valgrind)
115 #:use-module (gnu packages web)
116 #:use-module (gnu packages wxwidgets)
117 #:use-module (gnu packages xml)
118 #:use-module (ice-9 match))
119
120 ;; The gnu.org ‘home’ for this GNU project is a directory listing with 1.6.0 as
121 ;; the latest version. The author's git repository, mentioned in the 1.6.0
122 ;; README and otherwise legit-looking, contains a proper 1.7.0 release tarball
123 ;; with many OUI updates. Use it, even though it's also several years old now.
124 (define-public macchanger
125 (package
126 (name "macchanger")
127 (version "1.7.0")
128 (source
129 (origin
130 (method url-fetch)
131 (uri (string-append "https://github.com/alobbs/macchanger/"
132 "releases/download/" version "/"
133 name "-" version ".tar.gz"))
134 (sha256
135 (base32 "1gs5m0jxyprdp00w2qkbnaqm3ilkjz0q1gqdg4nzdm8g4xy73qns"))))
136 (build-system gnu-build-system)
137 (home-page "https://www.gnu.org/software/macchanger/")
138 (synopsis "Viewing and manipulating MAC addresses of network interfaces")
139 (description "GNU MAC Changer is a utility for viewing and changing MAC
140 addresses of networking devices. New addresses may be set explicitly or
141 randomly. They can include MAC addresses of the same or other hardware vendors
142 or, more generally, MAC addresses of the same category of hardware.")
143 (license license:gpl2+)))
144
145 (define-public miredo
146 (package
147 (name "miredo")
148 (version "1.2.6")
149 (source (origin
150 (method url-fetch)
151 (uri (string-append "http://www.remlab.net/files/miredo/miredo-"
152 version ".tar.xz"))
153 (sha256
154 (base32
155 "0j9ilig570snbmj48230hf7ms8kvcwi2wblycqrmhh85lksd49ps"))))
156 (build-system gnu-build-system)
157 (arguments
158 '(#:phases
159 (modify-phases %standard-phases
160 ;; The checkconf test in src/ requires network access.
161 (add-before
162 'check 'disable-checkconf-test
163 (lambda _
164 (substitute* "src/Makefile"
165 (("^TESTS = .*") "TESTS = \n"))
166 #t)))))
167 (home-page "http://www.remlab.net/miredo/")
168 (synopsis "Teredo IPv6 tunneling software")
169 (description
170 "Miredo is an implementation (client, relay, server) of the Teredo
171 specification, which provides IPv6 Internet connectivity to IPv6 enabled hosts
172 residing in IPv4-only networks, even when they are behind a NAT device.")
173 (license license:gpl2+)))
174
175 (define-public socat
176 (package
177 (name "socat")
178 (version "1.7.3.3")
179 (source (origin
180 (method url-fetch)
181 (uri (string-append
182 "http://www.dest-unreach.org/socat/download/socat-"
183 version ".tar.bz2"))
184 (sha256
185 (base32
186 "0jnhjijyq74g3wa4ph0am83z6vq7qna7ac0xqjma8s4197z3zmhd"))))
187 (build-system gnu-build-system)
188 (arguments '(#:tests? #f)) ;no 'check' phase
189 (inputs `(("openssl" ,openssl)))
190 (home-page "http://www.dest-unreach.org/socat/")
191 (synopsis
192 "Open bidirectional communication channels from the command line")
193 (description
194 "socat is a relay for bidirectional data transfer between two independent
195 data channels---files, pipes, devices, sockets, etc. It can create
196 \"listening\" sockets, named pipes, and pseudo terminals.
197
198 socat can be used, for instance, as TCP port forwarder, as a shell interface
199 to UNIX sockets, IPv6 relay, for redirecting TCP oriented programs to a serial
200 line, to logically connect serial lines on different computers, or to
201 establish a relatively secure environment (su and chroot) for running client
202 or server shell scripts with network connections.")
203 (license license:gpl2)))
204
205 (define-public tcp-wrappers
206 (package
207 (name "tcp-wrappers")
208 (version "7.6")
209 (source (origin
210 (method url-fetch)
211 (uri (string-append
212 "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_"
213 version ".tar.gz"))
214 (sha256
215 (base32
216 "0p9ilj4v96q32klavx0phw9va21fjp8vpk11nbh6v2ppxnnxfhwm"))))
217 (build-system gnu-build-system)
218 (arguments
219 `(#:phases
220 (modify-phases %standard-phases
221 (delete 'configure) ; there is no configure script
222 (delete 'check) ; there are no tests
223 (replace 'build
224 (lambda _
225 (chmod "." #o755)
226 ;; Upstream doesn't generate a shared library. So we have to do it.
227 (setenv "CC" "gcc -fno-builtin -fPIC")
228 (substitute* "Makefile"
229 (("^(all[^\n]*)" line) (string-append line " libwrap.so\n
230 libwrap.so: $(LIB_OBJ)\n
231 \tgcc -shared $^ -o $@\n")))
232 ;; Deal with some gcc breakage.
233 (substitute* "percent_m.c"
234 (("extern char .sys_errlist.*;") ""))
235 (substitute* "scaffold.c"
236 (("extern char .malloc.*;") ""))
237 ;; This, believe it or not, is the recommended way to build!
238 (invoke "make" "REAL_DAEMON_DIR=/etc" "linux")))
239 ;; There is no make install stage, so we have to do it ourselves.
240 (replace 'install
241 (lambda _
242 (let ((out (assoc-ref %outputs "out"))
243 (man-pages `("hosts_access.3"
244 "hosts_access.5"
245 "hosts_options.5"
246 "tcpd.8"
247 "tcpdchk.8"
248 "tcpdmatch.8"))
249 (libs `("libwrap.a"
250 "libwrap.so"))
251 (headers `("tcpd.h"))
252 (bins `("safe_finger"
253 "tcpd"
254 "tcpdchk"
255 "tcpdmatch"
256 "try-from")))
257 (for-each
258 (lambda (x)
259 (install-file x (string-append out "/include")))
260 headers)
261 (for-each
262 (lambda (x)
263 (install-file x (string-append out "/share/man/man"
264 (string-take-right x 1))))
265 man-pages)
266 (for-each
267 (lambda (x)
268 (install-file x (string-append out "/lib/")))
269 libs)
270 (for-each
271 (lambda (x)
272 (install-file x (string-append out "/bin/")))
273 bins))
274 #t)))))
275 (home-page "http://www.porcupine.org")
276 (synopsis "Monitor and filter incoming requests for network services")
277 (description "With this package you can monitor and filter incoming requests for
278 network services. It includes a library which may be used by daemons to
279 transparently check connection attempts against an access control list.")
280 (license (license:non-copyleft "file://DISCLAIMER"
281 "See the file DISCLAIMER in the distribution."))))
282
283
284 (define-public zeromq
285 (package
286 (name "zeromq")
287 (version "4.3.2")
288 (source (origin
289 (method url-fetch)
290 (uri (string-append "https://github.com/zeromq/libzmq/releases"
291 "/download/v" version "/zeromq-" version ".tar.gz"))
292 (sha256
293 (base32
294 "0qzp80ky4y2k7k1ya09v9gkivvfbz2km813snrb8jhnn634bbmzb"))))
295 (build-system gnu-build-system)
296 (home-page "https://zeromq.org")
297 (synopsis "Library for message-based applications")
298 (description
299 "The 0MQ lightweight messaging kernel is a library which extends the
300 standard socket interfaces with features traditionally provided by specialized
301 messaging middle-ware products. 0MQ sockets provide an abstraction of
302 asynchronous message queues, multiple messaging patterns, message
303 filtering (subscriptions), seamless access to multiple transport protocols and
304 more.")
305 (license license:lgpl3+)))
306
307 (define-public czmq
308 (package
309 (name "czmq")
310 (version "4.2.0")
311 (source (origin
312 (method url-fetch)
313 (uri (string-append
314 "https://github.com/zeromq/" name
315 "/releases/download/v" version
316 "/" name "-" version ".tar.gz"))
317 (sha256
318 (base32
319 "1szciz62sk3fm4ga9qjpxz0n0lazvphm32km95bq92ncng12kayg"))))
320 (build-system gnu-build-system)
321 (arguments
322 '(#:configure-flags '("--enable-drafts")
323 #:phases (modify-phases %standard-phases
324 (add-before 'check 'patch-tests
325 (lambda _
326 ;; XXX FIXME: Disable the zproc test, which fails on some
327 ;; hardware: <https://github.com/zeromq/czmq/issues/2007>.
328 (substitute* "src/czmq_selftest.c"
329 (("\\{ \"zproc\", zproc_test.*")
330 ""))
331 #t)))))
332 (inputs
333 `(("zeromq" ,zeromq)))
334 (home-page "http://zeromq.org")
335 (synopsis "High-level C bindings for ØMQ")
336 (description
337 "czmq provides bindings for the ØMQ core API that hides the differences
338 between different versions of ØMQ.")
339 (license license:mpl2.0)))
340
341 (define-public cppzmq
342 (let ((revision "0")
343 (commit "d9f0f016c07046742738c65e1eb84722ae32d7d4"))
344 (package
345 (name "cppzmq")
346 (version (string-append "4.2.2-" revision "."
347 (string-take commit 7)))
348 (source (origin
349 (method git-fetch)
350 (uri (git-reference
351 (url "https://github.com/zeromq/cppzmq")
352 (commit commit)))
353 (sha256
354 (base32
355 "1gmqlm00y6xpa5m6d4ajq3ww63n2w7h4sy997wj81vcqmqx45b1f"))
356 (file-name (string-append name "-" version "-checkout"))))
357 (build-system cmake-build-system)
358 (arguments '(#:tests? #f)) ; No tests.
359 (native-inputs
360 `(("pkg-config" ,pkg-config)))
361 (inputs
362 `(("zeromq" ,zeromq)))
363 (home-page "http://zeromq.org")
364 (synopsis "C++ bindings for the ØMQ messaging library")
365 (description
366 "This package provides header-only C++ bindings for ØMQ. The header
367 files contain direct mappings of the abstractions provided by the ØMQ C API.")
368 (license license:expat))))
369
370 (define-public librdkafka
371 (package
372 (name "librdkafka")
373 (version "0.9.1")
374 (source (origin
375 (method url-fetch)
376 (uri (string-append
377 "https://github.com/edenhill/librdkafka/archive/"
378 version ".tar.gz"))
379 (file-name (string-append name "-" version ".tar.gz"))
380 (sha256
381 (base32
382 "10ldx7g7ymmg17snzx78vy4n8ma1rjx0agzi34g15j2fk867xmas"))))
383 (build-system gnu-build-system)
384 (arguments
385 '(#:phases
386 (modify-phases %standard-phases
387 (replace 'configure
388 ;; its custom configure script doesn't understand 'CONFIG_SHELL'.
389 (lambda* (#:key outputs #:allow-other-keys)
390 (let ((out (assoc-ref outputs "out")))
391 ;; librdkafka++.so lacks RUNPATH for librdkafka.so
392 (setenv "LDFLAGS"
393 (string-append "-Wl,-rpath=" out "/lib"))
394 (invoke "./configure"
395 (string-append "--prefix=" out))))))))
396 (native-inputs
397 `(("python" ,python-wrapper)))
398 (propagated-inputs
399 `(("zlib" ,zlib))) ; in the Libs.private field of rdkafka.pc
400 (home-page "https://github.com/edenhill/librdkafka")
401 (synopsis "Apache Kafka C/C++ client library")
402 (description
403 "librdkafka is a C library implementation of the Apache Kafka protocol,
404 containing both Producer and Consumer support.")
405 (license license:bsd-2)))
406
407 (define-public libndp
408 (package
409 (name "libndp")
410 (version "1.7")
411 (source (origin
412 (method url-fetch)
413 (uri (string-append "http://libndp.org/files/"
414 name "-" version ".tar.gz"))
415 (sha256
416 (base32
417 "1dlinhl39va00v55qygjc9ap77yqf7xvn4rwmvdr49xhzzxhlj1c"))))
418 (build-system gnu-build-system)
419 (home-page "http://libndp.org/")
420 (synopsis "Library for Neighbor Discovery Protocol")
421 (description
422 "libndp contains a library which provides a wrapper for IPv6 Neighbor
423 Discovery Protocol. It also provides a tool named ndptool for sending and
424 receiving NDP messages.")
425 (license license:lgpl2.1+)))
426
427 (define-public ethtool
428 (package
429 (name "ethtool")
430 (version "5.4")
431 (source (origin
432 (method url-fetch)
433 (uri (string-append "mirror://kernel.org/software/network/"
434 "ethtool/ethtool-" version ".tar.xz"))
435 (sha256
436 (base32
437 "0srbqp4a3x9ryrbm5q854375y04ni8j0bmsrl89nmsyn4x4ixy12"))))
438 (build-system gnu-build-system)
439 (home-page "https://www.kernel.org/pub/software/network/ethtool/")
440 (synopsis "Display or change Ethernet device settings")
441 (description
442 "ethtool can be used to query and change settings such as speed,
443 auto-negotiation and checksum offload on many network devices, especially
444 Ethernet devices.")
445 (license license:gpl2)))
446
447 (define-public ifstatus
448 (package
449 (name "ifstatus")
450 (version "1.1.0")
451 (source (origin
452 (method url-fetch)
453 (uri (string-append "mirror://sourceforge/ifstatus/ifstatus/"
454 "ifstatus%20v" version "/ifstatus-v"
455 version ".tar.gz"))
456 (sha256
457 (base32
458 "045cbsq9ps32j24v8y5hpyqxnqn9mpaf3mgvirlhgpqyb9jsia0c"))
459 (modules '((guix build utils)))
460 (snippet
461 '(begin
462 (substitute* "Main.h"
463 (("#include <stdio.h>")
464 "#include <stdio.h>\n#include <stdlib.h>"))
465 #t))))
466 (build-system gnu-build-system)
467 (arguments
468 '(#:tests? #f ; no "check" target
469 #:phases
470 (modify-phases %standard-phases
471 (delete 'configure) ; no configure script
472 (replace 'install
473 (lambda* (#:key outputs #:allow-other-keys)
474 (let* ((out (assoc-ref outputs "out"))
475 (bin (string-append out "/bin")))
476 (mkdir-p bin)
477 (copy-file "ifstatus"
478 (string-append bin "/ifstatus")))
479 #t)))))
480 (inputs `(("ncurses" ,ncurses)))
481 (home-page "http://ifstatus.sourceforge.net/graphic/index.html")
482 (synopsis "Text based network interface status monitor")
483 (description
484 "IFStatus is a simple, easy-to-use program for displaying commonly
485 needed/wanted real-time traffic statistics of multiple network
486 interfaces, with a simple and efficient view on the command line. It is
487 intended as a substitute for the PPPStatus and EthStatus projects.")
488 (license license:gpl2+)))
489
490 (define-public nload
491 (package
492 (name "nload")
493 (version "0.7.4")
494 (source (origin
495 (method url-fetch)
496 (uri (string-append "mirror://sourceforge/nload/nload/" version
497 "/nload-" version ".tar.gz"))
498 (sha256
499 (base32
500 "1rb9skch2kgqzigf19x8bzk211jdfjfdkrcvaqyj89jy2pkm3h61"))))
501 (build-system gnu-build-system)
502 (inputs `(("ncurses" ,ncurses)))
503 (home-page "http://www.roland-riegel.de/nload/")
504 (synopsis "Realtime console network usage monitor")
505 (description
506 "Nload is a console application which monitors network traffic and
507 bandwidth usage in real time. It visualizes the in- and outgoing traffic using
508 two graphs, and provides additional info like total amount of transferred data
509 and min/max network usage.")
510 (license license:gpl2+)))
511
512 (define-public iodine
513 (package
514 (name "iodine")
515 (version "0.7.0")
516 (source (origin
517 (method url-fetch)
518 (uri (string-append "http://code.kryo.se/" name "/"
519 name "-" version ".tar.gz"))
520 (sha256
521 (base32
522 "0gh17kcxxi37k65zm4gqsvbk3aw7yphcs3c02pn1c4s2y6n40axd"))))
523 (build-system gnu-build-system)
524 (arguments
525 '(#:phases
526 (modify-phases %standard-phases
527 (delete 'configure)
528 (add-before 'build 'fix-ifconfig-path
529 ;; This package works only with the net-tools version of ifconfig.
530 (lambda* (#:key inputs #:allow-other-keys)
531 (substitute* "src/tun.c"
532 (("PATH=[^ ]* ")
533 (string-append (assoc-ref inputs "net-tools") "/bin/")))
534 #t))
535 (add-before 'check 'delete-failing-tests
536 ;; Avoid https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802105.
537 (lambda _
538 (substitute* "tests/common.c"
539 (("tcase_add_test\\(tc, \
540 test_parse_format_ipv(4(|_listen_all|_mapped_ipv6)|6)\\);")
541 ""))
542 #t)))
543 #:make-flags (list "CC=gcc"
544 (string-append "prefix=" (assoc-ref %outputs "out")))
545 #:test-target "test"))
546 (inputs `(("net-tools" ,net-tools)
547 ("zlib" ,zlib)))
548 (native-inputs `(("check" ,check)
549 ("pkg-config" ,pkg-config)))
550 (home-page "http://code.kryo.se/iodine/")
551 (synopsis "Tunnel IPv4 data through a DNS server")
552 (description "Iodine tunnels IPv4 data through a DNS server. This
553 can be useful in different situations where internet access is firewalled, but
554 DNS queries are allowed. The bandwidth is asymmetrical, with limited upstream
555 and up to 1 Mbit/s downstream.")
556 ;; src/md5.[ch] is released under the zlib license
557 (license (list license:isc license:zlib))))
558
559 (define-public whois
560 (package
561 (name "whois")
562 (version "5.5.4")
563 (source
564 (origin
565 (method url-fetch)
566 (uri (string-append "mirror://debian/pool/main/w/whois/"
567 "whois_" version ".tar.xz"))
568 (sha256
569 (base32 "0k97aiz7ngkjz3vhzvk27kqhnmqmkskdfx310c94qnh8fd7hiqfi"))))
570 (build-system gnu-build-system)
571 (arguments
572 `(#:tests? #f ; no test suite
573 #:make-flags (list "CC=gcc"
574 (string-append "prefix=" (assoc-ref %outputs "out")))
575 #:phases
576 (modify-phases %standard-phases
577 (delete 'configure) ; no configure script
578 (add-before 'build 'setenv
579 (lambda _
580 (setenv "HAVE_ICONV" "1")
581 #t)))))
582 (inputs
583 `(("libidn2" ,libidn2)))
584 (native-inputs
585 `(("gettext" ,gettext-minimal)
586 ("perl" ,perl)
587 ("pkg-config" ,pkg-config)))
588 (synopsis "Intelligent client for the WHOIS directory service")
589 (description
590 "whois searches for an object in a @dfn{WHOIS} (RFC 3912) database.
591 It is commonly used to look up the registered users or assignees of an Internet
592 resource, such as a domain name, an IP address block, or an autonomous system.
593 It can automatically select the appropriate server for most queries.
594
595 For historical reasons, this package also includes @command{mkpasswd}, which
596 encrypts passwords using @code{crypt(3)} and is unrelated to the Expect command
597 of the same name.")
598 (home-page "https://github.com/rfc1036/whois")
599 (license license:gpl2+)))
600
601 (define-public wireshark
602 (package
603 (name "wireshark")
604 (version "3.2.0")
605 (source
606 (origin
607 (method url-fetch)
608 (uri (string-append "https://www.wireshark.org/download/src/wireshark-"
609 version ".tar.xz"))
610 (sha256
611 (base32 "0v5nn7i2nbqr59jsw8cs2052hr7xd96x1sa3480g8ks5kahk7zac"))))
612 (build-system cmake-build-system)
613 (arguments
614 `(#:phases
615 (modify-phases %standard-phases
616 (add-after 'unpack 'remove-failing-test
617 ;; Test 31/32 fails with errors like "Program reassemble_test is
618 ;; not available". Skipping it for now.
619 (lambda _
620 (substitute* "CMakeLists.txt"
621 (("suite_unittests" all) (string-append "# " all)))
622 #t)))
623 ;; Build process chokes during `validate-runpath' phase.
624 ;;
625 ;; Errors are like the following:
626 ;; "/gnu/store/...wireshark-3.0.0/lib/wireshark/plugins/3.0/epan/ethercat.so:
627 ;; error: depends on 'libwireshark.so.12', which cannot be found in
628 ;; RUNPATH". That is, "/gnu/store/...wireshark-3.0.0./lib" doesn't
629 ;; belong to RUNPATH.
630 ;;
631 ;; That’s not a problem in practice because "ethercat.so" is a plugin,
632 ;; so it’s dlopen’d by a process that already provides "libwireshark".
633 ;; For now, we disable this phase.
634 #:validate-runpath? #f))
635 (inputs
636 `(("c-ares" ,c-ares)
637 ("glib" ,glib)
638 ("gnutls" ,gnutls)
639 ("libcap" ,libcap)
640 ("libgcrypt" ,libgcrypt)
641 ("libnl" ,libnl)
642 ("libpcap" ,libpcap)
643 ("libssh" ,libssh)
644 ("libxml2" ,libxml2)
645 ("lz4" ,lz4)
646 ("lua" ,lua-5.2) ;Lua 5.3 unsupported
647 ("krb5" ,mit-krb5)
648 ("qtbase" ,qtbase)
649 ("qtmultimedia" ,qtmultimedia)
650 ("qtsvg" ,qtsvg)
651 ("sbc" ,sbc)
652 ("snappy" ,snappy)
653 ("zlib" ,zlib)))
654 (native-inputs
655 `(("bison" ,bison)
656 ("doxygen" ,doxygen)
657 ("flex" ,flex)
658 ("gettext" ,gettext-minimal)
659 ("perl" ,perl)
660 ("pkg-config" ,pkg-config)
661 ("python" ,python-wrapper)
662 ("qttools" ,qttools)))
663 (synopsis "Network traffic analyzer")
664 (description "Wireshark is a network protocol analyzer, or @dfn{packet
665 sniffer}, that lets you capture and interactively browse the contents of
666 network frames.")
667 (home-page "https://www.wireshark.org/")
668 (license license:gpl2+)))
669
670 (define-public fping
671 (package
672 (name "fping")
673 (version "4.2")
674 (source
675 (origin
676 (method url-fetch)
677 (uri (string-append "https://fping.org/dist/fping-"
678 version ".tar.gz"))
679 (sha256
680 (base32 "0jmnf4vmr43aiwk3h2b5qdsb95gxar8gz1yli8fswnm9nrs9ccvx"))))
681 (build-system gnu-build-system)
682 (home-page "https://fping.org/")
683 (synopsis "Send ICMP ECHO_REQUEST packets to network hosts")
684 (description
685 "fping is a ping like program which uses the Internet Control Message
686 Protocol (ICMP) echo request to determine if a target host is responding.
687 fping differs from ping in that you can specify any number of targets on the
688 command line, or specify a file containing the lists of targets to ping.
689 Instead of sending to one target until it times out or replies, fping will
690 send out a ping packet and move on to the next target in a round-robin
691 fashion.")
692 (license license:expat)))
693
694 (define-public gandi.cli
695 (package
696 (name "gandi.cli")
697 (version "1.5")
698 (source
699 (origin
700 (method url-fetch)
701 (uri (pypi-uri name version))
702 (sha256
703 (base32 "110wc9zgxsrvw4yzp21p0ian5lcf7vhcpxhnmsc4fg9pzl2bwxd5"))))
704 (build-system python-build-system)
705 (arguments
706 `(#:phases
707 (modify-phases %standard-phases
708 (add-after 'unpack 'embed-store-file-names
709 (lambda _
710 (substitute* (list "gandi/cli/modules/cert.py"
711 "gandi/cli/tests/commands/test_certificate.py")
712 (("openssl") (which "openssl")))
713 #t))
714 (add-after 'install 'install-documentation
715 ;; The included man page may be outdated but we install it anyway,
716 ;; since it's mentioned in 'gandi --help' and better than nothing.
717 (lambda* (#:key outputs #:allow-other-keys)
718 (let* ((out (assoc-ref outputs "out"))
719 (man1 (string-append out "/share/man/man1")))
720 (mkdir-p man1)
721 (with-output-to-file (string-append man1 "/gandi.1")
722 (lambda _
723 (invoke "rst2man.py" "gandicli.man.rst")))
724 #t))))))
725 (native-inputs
726 `(("python-docutils" ,python-docutils) ; for rst2man.py
727 ("python-pytest-cov" ,python-pytest-cov)
728 ("python-tox" ,python-tox)))
729 (inputs
730 `(("openssl" ,openssl)
731 ("python-click" ,python-click)
732 ("python-ipy" ,python-ipy)
733 ("python-pyyaml" ,python-pyyaml)
734 ("python-requests" ,python-requests)))
735 (home-page "https://cli.gandi.net")
736 (synopsis "Command-line interface to the Gandi.net Web API")
737 (description
738 "This package provides a command-line client (@command{gandi}) to buy,
739 manage, and delete Internet resources from Gandi.net such as domain names,
740 virtual machines, and certificates.")
741 (license license:gpl3+)))
742
743 (define-public go-netns
744 (let ((commit "13995c7128ccc8e51e9a6bd2b551020a27180abd")
745 (revision "1"))
746 (package
747 (name "go-netns")
748 (version (git-version "0.0.0" revision commit))
749 (source (origin
750 (method git-fetch)
751 (uri (git-reference
752 (url "https://github.com/vishvananda/netns.git")
753 (commit commit)))
754 (file-name (git-file-name name version))
755 (sha256
756 (base32
757 "1zk6w8158qi4niva5rijchbv9ixgmijsgqshh54wdaav4xrhjshn"))))
758 (build-system go-build-system)
759 (arguments
760 `(#:import-path "github.com/vishvananda/netns"
761 #:tests? #f)) ;tests require root privileges
762 (home-page "https://github.com/vishvananda/netns")
763 (synopsis "Simple network namespace handling for Go")
764 (description "The netns package provides a simple interface for
765 handling network namespaces in Go.")
766 (license license:asl2.0))))
767
768 (define-public go-sctp
769 ;; docker-libnetwork-cmd-proxy requires this exact commit.
770 (let ((commit "07191f837fedd2f13d1ec7b5f885f0f3ec54b1cb")
771 (revision "1"))
772 (package
773 (name "go-sctp")
774 (version (git-version "0.0.0" revision commit))
775 (source (origin
776 (method git-fetch)
777 (uri (git-reference
778 (url "https://github.com/ishidawataru/sctp.git")
779 (commit commit)))
780 (file-name (git-file-name name version))
781 (sha256
782 (base32
783 "1mk9ncm10gwi5pn5wcw4skbyf4qg7n5qdf1mim4gf3mrckvi6g6h"))))
784 (build-system go-build-system)
785 (arguments
786 `(#:import-path "github.com/ishidawataru/sctp"))
787 (home-page "https://github.com/ishidawataru/sctp")
788 (synopsis "SCTP library for the Go programming language")
789 (description "This library provides methods for using the stream control
790 transmission protocol (SCTP) in a Go application.")
791 (license license:asl2.0))))
792
793 (define-public httping
794 (package
795 (name "httping")
796 (version "2.5")
797 (source
798 (origin
799 (method url-fetch)
800 (uri (string-append "https://www.vanheusden.com/httping/httping-"
801 version ".tgz"))
802 (sha256
803 (base32
804 "1y7sbgkhgadmd93x1zafqc4yp26ssiv16ni5bbi9vmvvdl55m29y"))))
805 (build-system gnu-build-system)
806 (native-inputs
807 `(("gettext" ,gettext-minimal)))
808 (inputs
809 `(("fftw" ,fftw)
810 ("ncurses" ,ncurses)
811 ("openssl" ,openssl)))
812 (arguments
813 `(#:make-flags (list "CC=gcc"
814 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
815 "PREFIX=")
816 #:tests? #f)) ; no tests
817 (home-page "https://www.vanheusden.com/httping/")
818 (synopsis "Web server latency and throughput monitor")
819 (description
820 "httping measures how long it takes to connect to a web server, send an
821 HTTP(S) request, and receive the reply headers. It is somewhat similar to
822 @command{ping}, but can be used even in cases where ICMP traffic is blocked
823 by firewalls or when you want to monitor the response time of the actual web
824 application stack itself.")
825 (license license:gpl2))) ; with permission to link with OpenSSL
826
827 (define-public httpstat
828 (package
829 (name "httpstat")
830 (version "1.2.1")
831 (source
832 (origin
833 (method url-fetch)
834 (uri (pypi-uri "httpstat" version))
835 (sha256
836 (base32
837 "1chw2nk56vaq87aba012a270k9na06hfx1pfbsrc3jfvlc2kb9hb"))))
838 (build-system python-build-system)
839 (inputs `(("curl" ,curl)))
840 (arguments
841 '(#:phases
842 (modify-phases %standard-phases
843 (add-before 'build 'fix-curl-path
844 (lambda* (#:key inputs #:allow-other-keys)
845 (substitute* "httpstat.py"
846 (("ENV_CURL_BIN.get\\('curl'\\)")
847 (string-append "ENV_CURL_BIN.get('"
848 (assoc-ref inputs "curl")
849 "/bin/curl')")))
850 #t)))))
851 (home-page "https://github.com/reorx/httpstat")
852 (synopsis "Visualize curl statistics")
853 (description
854 "@command{httpstat} is a tool to visualize statistics from the
855 @command{curl} HTTP client. It acts as a wrapper for @command{curl} and
856 prints timing information for each step of the HTTP request (DNS lookup,
857 TCP connection, TLS handshake and so on) in the terminal.")
858 (license license:expat)))
859
860 (define-public bwm-ng
861 (package
862 (name "bwm-ng")
863 (version "0.6.2")
864 (source
865 (origin
866 (method git-fetch)
867 (uri (git-reference
868 (url "https://github.com/vgropp/bwm-ng.git")
869 (commit (string-append "v" version))))
870 (file-name (git-file-name name version))
871 (sha256
872 (base32 "0k906wb4pw3dcqpcwnni78lahzi3bva483f8c17sjykic7as4y5n"))))
873 (build-system gnu-build-system)
874 (arguments
875 `(#:phases
876 (modify-phases %standard-phases
877 (add-after 'unpack 'disable-premature-./configure
878 (lambda _
879 (substitute* "autogen.sh"
880 (("\\$srcdir/configure")
881 "true"))
882 #t)))))
883 (native-inputs
884 `(("autoconf" ,autoconf)
885 ("automake" ,automake)))
886 (inputs
887 `(("ncurses" ,ncurses)))
888 (synopsis "Console based live network and disk I/O bandwidth monitor")
889 (description "Bandwidth Monitor NG is a small and simple console based
890 live network and disk I/O bandwidth monitor.")
891 (home-page "https://www.gropp.org/?id=projects&sub=bwm-ng")
892 (license license:gpl2)))
893
894 (define-public aircrack-ng
895 (package
896 (name "aircrack-ng")
897 (version "1.5.2")
898 (source
899 (origin
900 (method url-fetch)
901 (uri (string-append "https://download.aircrack-ng.org/aircrack-ng-"
902 version ".tar.gz"))
903 (sha256
904 (base32
905 "0hc2x17bxk2n00z8jj5jfwq3z41681fd19n018724il0cpkjyncy"))))
906 (build-system gnu-build-system)
907 (native-inputs
908 `(("autoconf" ,autoconf)
909 ("automake" ,automake)
910 ("libtool" ,libtool)
911 ("pkg-config" ,pkg-config)
912 ("which" ,which)))
913 (inputs
914 `(("libgcrypt" ,libgcrypt)
915 ("libnl" ,libnl)
916 ("libpcap" ,libpcap)
917 ("ethtool" ,ethtool)
918 ("pcre" ,pcre)
919 ("sqlite" ,sqlite)
920 ("zlib" ,zlib)))
921 (arguments
922 `(#:configure-flags
923 (list "--with-experimental=yes" ; build wesside-ng, etc.
924 "--with-gcrypt") ; openssl's the default
925 #:phases (modify-phases %standard-phases
926 (add-before 'bootstrap 'patch-evalrev
927 (lambda _
928 ;; Called by ./autogen.sh below, before the default
929 ;; ‘patch-shebangs’ phase has had a chance to run.
930 (substitute* "evalrev"
931 (("/bin/sh")
932 (which "sh")))
933 #t))
934 (replace 'bootstrap
935 (lambda _
936 ;; Patch shebangs in generated files before running
937 ;; ./configure.
938 (setenv "NOCONFIGURE" "please")
939 (invoke "bash" "./autogen.sh")))
940 (add-after 'build 'absolutize-tools
941 (lambda* (#:key inputs #:allow-other-keys)
942 (let ((ethtool (string-append (assoc-ref inputs "ethtool")
943 "/sbin/ethtool")))
944 (substitute* "scripts/airmon-ng"
945 (("ethtool ")
946 (string-append ethtool " ")))
947 #t))))))
948 (home-page "https://www.aircrack-ng.org")
949 (synopsis "Assess WiFi network security")
950 (description
951 "Aircrack-ng is a complete suite of tools to assess WiFi network
952 security. It focuses on different areas of WiFi security: monitoring,
953 attacking, testing, and cracking. All tools are command-line driven, which
954 allows for heavy scripting.")
955 (license (list license:gpl2+ license:bsd-3))))
956
957 (define-public pixiewps
958 (package
959 (name "pixiewps")
960 (version "1.4.2")
961 (source (origin
962 (method url-fetch)
963 (uri (string-append
964 "https://github.com/wiire-a/pixiewps/releases/"
965 "download/v" version "/" name "-" version ".tar.xz"))
966 (sha256
967 (base32
968 "07nym6bqml0k9v29vnj003nrgnwrywgjvnljb7cdpsvnwilhbp64"))))
969 (build-system gnu-build-system)
970 (arguments
971 '(#:make-flags
972 (list "CC=gcc"
973 (string-append "PREFIX=" (assoc-ref %outputs "out")))
974 #:phases
975 (modify-phases %standard-phases
976 (delete 'configure)) ; no configure script
977 #:tests? #f)) ; there are no tests
978 (home-page "https://github.com/wiire-a/pixiewps/")
979 (synopsis "Offline brute-force tool for Wi-Fi Protected Setup")
980 (description "Pixiewps implements the pixie-dust attack to brute
981 force the Wi-Fi Protected Setup (WPS) PIN by exploiting the low or
982 non-existing entropy of some access points.")
983 (license license:gpl3+)))
984
985 (define-public reaver
986 (package
987 (name "reaver")
988 (version "1.6.5")
989 (source (origin
990 (method url-fetch)
991 (uri (string-append
992 "https://github.com/t6x/reaver-wps-fork-t6x/releases/"
993 "download/v" version "/" name "-" version ".tar.xz"))
994 (sha256
995 (base32
996 "0sva3g0kwgv143n9l3lg4qp5iiqz7nk76nr0hwivsnglbhk9sbil"))))
997 (build-system gnu-build-system)
998 (arguments
999 `(#:configure-flags
1000 ;; Save session files to current directory instead of /var.
1001 (list "--enable-savetocurrent"
1002 "--localstatedir=/tmp/dummy") ; prevent creating /var during install
1003 #:phases
1004 (modify-phases %standard-phases
1005 (add-before 'configure 'change-directory
1006 (lambda _
1007 (chdir "src")
1008 #t))
1009 (add-after 'install 'install-doc
1010 (lambda* (#:key outputs #:allow-other-keys)
1011 (chdir "../docs")
1012 (let* ((out (assoc-ref outputs "out"))
1013 (doc (string-append out "/share/doc/" ,name "-" ,version))
1014 (man1 (string-append out "/share/man/man1")))
1015 (for-each (lambda (file) (install-file file doc))
1016 (find-files "." "README.*"))
1017 (install-file "reaver.1" man1)
1018 #t))))
1019 #:tests? #f)) ; there are no tests
1020 (inputs
1021 `(("libpcap" ,libpcap)))
1022 (propagated-inputs
1023 `(("aircrack-ng" ,aircrack-ng)
1024 ("pixiewps" ,pixiewps)))
1025 (home-page "https://github.com/t6x/reaver-wps-fork-t6x/")
1026 (synopsis "Attack tool for Wi-Fi Protected Setup")
1027 (description "Reaver performs a brute force attack against an access
1028 point's Wi-Fi Protected Setup (WPS) PIN. Once the PIN is found, the WPA
1029 passphrase can be recovered and the AP's wireless settings can be
1030 reconfigured.")
1031 (license license:gpl2+)))
1032
1033 (define-public perl-danga-socket
1034 (package
1035 (name "perl-danga-socket")
1036 (version "1.62")
1037 (source
1038 (origin
1039 (method url-fetch)
1040 (uri (string-append "mirror://cpan/authors/id/N/NM/NML/"
1041 "Danga-Socket-" version ".tar.gz"))
1042 (sha256
1043 (base32 "0x4bvirmf0kphks19jwgva00zz73zx344218dfaiv8gigrw3yg4m"))))
1044 (build-system perl-build-system)
1045 (native-inputs
1046 `(("perl-test-tcp" ,perl-test-tcp)))
1047 (propagated-inputs
1048 `(("perl-sys-syscall" ,perl-sys-syscall)))
1049 (home-page "https://metacpan.org/release/Danga-Socket")
1050 (synopsis "Event loop and event-driven async socket base class")
1051 (description
1052 "Danga::Socket is an abstract base class for objects backed by a socket
1053 which provides the basic framework for event-driven asynchronous IO, designed
1054 to be fast. Danga::Socket is both a base class for objects, and an event
1055 loop.")
1056 (license license:perl-license)))
1057
1058 (define-public perl-data-validate-ip
1059 (package
1060 (name "perl-data-validate-ip")
1061 (version "0.27")
1062 (source
1063 (origin
1064 (method url-fetch)
1065 (uri (string-append
1066 "mirror://cpan/authors/id/D/DR/DROLSKY/Data-Validate-IP-"
1067 version ".tar.gz"))
1068 (sha256
1069 (base32 "1mmppyzsh1w2z2h86kvzqxy56wxgs62a3kf8nvcnz76bblir5ap1"))))
1070 (build-system perl-build-system)
1071 (native-inputs
1072 `(("perl-test-requires" ,perl-test-requires)))
1073 (propagated-inputs
1074 `(("perl-netaddr-ip" ,perl-netaddr-ip)))
1075 (home-page "https://metacpan.org/release/Data-Validate-IP")
1076 (synopsis "IPv4 and IPv6 validation methods")
1077 (description
1078 "This module provides several IP address validation subroutines that both
1079 validate and untaint their input. This includes both basic validation
1080 (@code{is_ipv4()} and @code{is_ipv6()}) and special cases like checking whether
1081 an address belongs to a specific network or whether an address is public or
1082 private (reserved).")
1083 (license license:perl-license)))
1084
1085 (define-public perl-net-dns
1086 (package
1087 (name "perl-net-dns")
1088 (version "1.21")
1089 (source
1090 (origin
1091 (method url-fetch)
1092 (uri
1093 (list
1094 (string-append "https://www.net-dns.org/download/Net-DNS-"
1095 version ".tar.gz")
1096 (string-append "mirror://cpan/authors/id/N/NL/NLNETLABS/Net-DNS-"
1097 version ".tar.gz")))
1098 (sha256
1099 (base32 "0yknrsh0wqr9s43c0wf3dyzrsi2r7k0v75hay74gqkq850xy3vyx"))))
1100 (build-system perl-build-system)
1101 (inputs
1102 `(("perl-digest-hmac" ,perl-digest-hmac)))
1103 (home-page "https://www.net-dns.org/")
1104 (synopsis
1105 "Perl Interface to the Domain Name System")
1106 (description "Net::DNS is the Perl Interface to the Domain Name System.")
1107 (license license:x11)))
1108
1109 (define-public perl-socket6
1110 (package
1111 (name "perl-socket6")
1112 (version "0.29")
1113 (source
1114 (origin
1115 (method url-fetch)
1116 (uri (string-append
1117 "mirror://cpan/authors/id/U/UM/UMEMOTO/Socket6-"
1118 version
1119 ".tar.gz"))
1120 (sha256
1121 (base32
1122 "054izici8klfxs8hr5rljib28plijpsfymy99xbzdp047bx1b2a6"))))
1123 (build-system perl-build-system)
1124 (arguments
1125 `(#:phases
1126 (modify-phases %standard-phases
1127 (replace 'configure
1128 (lambda* (#:key outputs #:allow-other-keys)
1129 (let* ((out (assoc-ref outputs "out"))
1130 (args `("Makefile.PL"
1131 ,(string-append "PREFIX=" out)
1132 "INSTALLDIRS=site")))
1133 (setenv "CONFIG_SHELL" (which "sh"))
1134 (apply invoke "perl" args)))))))
1135 (home-page "https://metacpan.org/release/Socket6")
1136 (synopsis
1137 "IPv6 related part of the C socket.h defines and structure manipulators for Perl")
1138 (description "Socket6 binds the IPv6 related part of the C socket header
1139 definitions and structure manipulators for Perl.")
1140 (license license:bsd-3)))
1141
1142 (define-public perl-net-dns-resolver-programmable
1143 (package
1144 (name "perl-net-dns-resolver-programmable")
1145 (version "v0.003")
1146 (source
1147 (origin
1148 (method url-fetch)
1149 (uri (string-append
1150 "mirror://cpan/authors/id/J/JM/JMEHNLE/net-dns-resolver-programmable/"
1151 "Net-DNS-Resolver-Programmable-" version ".tar.gz"))
1152 (sha256
1153 (base32
1154 "1v3nl2kaj4fs55n1617n53q8sa3mir06898vpy1rq98zjih24h4d"))
1155 (patches
1156 (search-patches "perl-net-dns-resolver-programmable-fix.patch"))))
1157 (build-system perl-build-system)
1158 (native-inputs
1159 `(("perl-module-build" ,perl-module-build)))
1160 (inputs `(("perl-net-dns" ,perl-net-dns)))
1161 (home-page
1162 "https://metacpan.org/release/Net-DNS-Resolver-Programmable")
1163 (synopsis
1164 "Programmable DNS resolver class for offline emulation of DNS")
1165 (description "Net::DNS::Resolver::Programmable is a programmable DNS resolver for
1166 offline emulation of DNS.")
1167 (license license:perl-license)))
1168
1169 (define-public perl-net-dns-resolver-mock
1170 (package
1171 (name "perl-net-dns-resolver-mock")
1172 (version "1.20171219")
1173 (source (origin
1174 (method url-fetch)
1175 (uri (string-append
1176 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
1177 "Net-DNS-Resolver-Mock-" version ".tar.gz"))
1178 (sha256
1179 (base32
1180 "0m3rxpkv1b9121srvbqkrgzg4m8mnydiydqv34in1i1ixwrl6jn9"))))
1181 (build-system perl-build-system)
1182 (inputs
1183 `(("perl-net-dns" ,perl-net-dns)))
1184 (home-page "https://metacpan.org/release/Net-DNS-Resolver-Mock")
1185 (synopsis "Mock DNS Resolver object for testing")
1186 (description
1187 "Net::DNS::Resolver::Mock is a subclass of Net::DNS::Resolver, but returns
1188 static data from any provided DNS zone file instead of querying the network.
1189 It is intended primarily for use in testing.")
1190 (license license:perl-license)))
1191
1192 (define-public perl-netaddr-ip
1193 (package
1194 (name "perl-netaddr-ip")
1195 (version "4.079")
1196 (source
1197 (origin
1198 (method url-fetch)
1199 (uri (string-append
1200 "mirror://cpan/authors/id/M/MI/MIKER/NetAddr-IP-"
1201 version
1202 ".tar.gz"))
1203 (sha256
1204 (base32
1205 "1rx0dinrz9fk9qcg4rwqq5n1dm3xv2arymixpclcv2q2nzgq4npc"))))
1206 (build-system perl-build-system)
1207 (arguments
1208 `(#:phases
1209 (modify-phases %standard-phases
1210 (replace 'configure
1211 (lambda* (#:key outputs #:allow-other-keys)
1212 (let* ((out (assoc-ref outputs "out"))
1213 (args `("Makefile.PL"
1214 ,(string-append "PREFIX=" out)
1215 "INSTALLDIRS=site")))
1216 (setenv "CONFIG_SHELL" (which "sh"))
1217 (apply invoke "perl" args)))))))
1218 (home-page
1219 "https://metacpan.org/release/NetAddr-IP")
1220 (synopsis
1221 "Manages IPv4 and IPv6 addresses and subnets")
1222 (description "NetAddr::IP manages IPv4 and IPv6 addresses and subsets.")
1223 (license license:perl-license)))
1224
1225 (define-public perl-net-patricia
1226 (package
1227 (name "perl-net-patricia")
1228 (version "1.22")
1229 (source
1230 (origin
1231 (method url-fetch)
1232 (uri (string-append
1233 "mirror://cpan/authors/id/G/GR/GRUBER/Net-Patricia-"
1234 version
1235 ".tar.gz"))
1236 (sha256
1237 (base32
1238 "0ln5f57vc8388kyh9vhx2infrdzfhbpgyby74h1qsnhwds95m0vh"))))
1239 (build-system perl-build-system)
1240 (arguments
1241 '(#:phases
1242 (modify-phases %standard-phases
1243 (add-after 'unpack 'dont-link-with-nsl ; Borrowed from Debian.
1244 (lambda _
1245 (substitute* "Makefile.PL"
1246 (("-lnsl") ""))
1247 #t)))))
1248 (inputs
1249 `(("perl-net-cidr-lite" ,perl-net-cidr-lite)
1250 ("perl-socket6" ,perl-socket6)))
1251 (home-page
1252 "https://metacpan.org/release/Net-Patricia")
1253 (synopsis
1254 "Patricia Trie Perl module for fast IP address lookups")
1255 (description
1256 "Net::Patricia does IP address lookups quickly in Perl.")
1257 ;; The bindings are licensed under GPL2 or later.
1258 ;; libpatricia is licensed under 2-clause BSD.
1259 (license (list license:gpl2+ license:bsd-2))))
1260
1261 (define-public perl-net-cidr-lite
1262 (package
1263 (name "perl-net-cidr-lite")
1264 (version "0.21")
1265 (source
1266 (origin
1267 (method url-fetch)
1268 (uri (string-append
1269 "mirror://cpan/authors/id/D/DO/DOUGW/Net-CIDR-Lite-"
1270 version
1271 ".tar.gz"))
1272 (sha256
1273 (base32
1274 "14shj73zbqmfjbp0qz1fs9j4p2dpvz5hfkm4qfdjbydflbl2b8fg"))))
1275 (build-system perl-build-system)
1276 (home-page
1277 "https://metacpan.org/release/Net-CIDR-Lite")
1278 (synopsis
1279 "Perl extension for merging IPv4 or IPv6 CIDR addresses")
1280 (description "Net::CIDR::Lite merges IPv4 or IPv6 CIDR addresses.")
1281 (license license:gpl1+)))
1282
1283 ;; TODO: Use the geolite-mirror-simple.pl script from the example
1284 ;; directory to stay current with the databases. How?
1285 (define-public perl-geo-ip
1286 (package
1287 (name "perl-geo-ip")
1288 (version "1.51")
1289 (source
1290 (origin
1291 (method url-fetch)
1292 (uri (string-append
1293 "mirror://cpan/authors/id/M/MA/MAXMIND/Geo-IP-"
1294 version
1295 ".tar.gz"))
1296 (sha256
1297 (base32
1298 "1fka8fr7fw6sh3xa9glhs1zjg3s2gfkhi7n7da1l2m2wblqj0c0n"))))
1299 (build-system perl-build-system)
1300 (home-page "https://metacpan.org/release/Geo-IP")
1301 (synopsis
1302 "Look up location and network information by IP Address in Perl")
1303 (description "The Perl module @code{Geo::IP}. It looks up location and
1304 network information by IP Address.")
1305 (license license:perl-license)))
1306
1307 (define-public perl-io-socket-inet6
1308 (package
1309 (name "perl-io-socket-inet6")
1310 (version "2.72")
1311 (source
1312 (origin
1313 (method url-fetch)
1314 (uri (string-append
1315 "mirror://cpan/authors/id/S/SH/SHLOMIF/IO-Socket-INET6-"
1316 version
1317 ".tar.gz"))
1318 (sha256
1319 (base32
1320 "1fqypz6qa5rw2d5y2zq7f49frwra0aln13nhq5gi514j2zx21q45"))))
1321 (build-system perl-build-system)
1322 (native-inputs
1323 `(("perl-module-build" ,perl-module-build)
1324 ("perl-test-pod" ,perl-test-pod)
1325 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
1326 (inputs `(("perl-socket6" ,perl-socket6)))
1327 (arguments `(;; Need network socket API
1328 #:tests? #f))
1329 (home-page
1330 "https://metacpan.org/release/IO-Socket-INET6")
1331 (synopsis
1332 "Perl object interface for AF_INET/AF_INET6 domain sockets")
1333 (description "IO::Socket::INET6 is an interface for AF_INET/AF_INET6 domain
1334 sockets in Perl.")
1335 (license license:perl-license)))
1336
1337 (define-public libproxy
1338 (package
1339 (name "libproxy")
1340 (version "0.4.15")
1341 (source (origin
1342 (method url-fetch)
1343 (uri (string-append "https://github.com/libproxy/libproxy/"
1344 "releases/download/" version "/libproxy-"
1345 version ".tar.xz"))
1346 (sha256
1347 (base32
1348 "0kvdrazlzwia876w988cmlypp253gwy6idlh8mjk958c29jb8kb5"))))
1349 (build-system cmake-build-system)
1350 (native-inputs
1351 `(("pkg-config" ,pkg-config)))
1352 (inputs
1353 `(("dbus" ,dbus)
1354 ("zlib" ,zlib)))
1355 (arguments
1356 `(#:phases
1357 (modify-phases %standard-phases
1358 (replace 'check
1359 (lambda _
1360 (invoke "ctest" "-E" "url-test"))))))
1361 (synopsis "Library providing automatic proxy configuration management")
1362 (description "Libproxy handles the details of HTTP/HTTPS proxy
1363 configuration for applications across all scenarios. Applications using
1364 libproxy only have to specify which proxy to use.")
1365 (home-page "https://libproxy.github.io/libproxy")
1366 (license license:lgpl2.1+)))
1367
1368 (define-public proxychains-ng
1369 (package
1370 (name "proxychains-ng")
1371 (version "4.14")
1372 (source
1373 (origin
1374 (method url-fetch)
1375 (uri (string-append "http://ftp.barfooze.de/pub/sabotage/tarballs/"
1376 "proxychains-ng-" version ".tar.xz"))
1377 (sha256
1378 (base32 "1bmhfbl1bzc87vl0xwr1wh5xvslfyc41nl2hqzhbj258p0sy004x"))))
1379 (build-system gnu-build-system)
1380 (arguments
1381 `(#:tests? #f ; there are no tests
1382 #:phases
1383 (modify-phases %standard-phases
1384 (add-after 'unpack 'fix-configure-script
1385 (lambda _
1386 ;; The configure script is very intolerant to unknown arguments,
1387 ;; such as "CONFIG_SHELL".
1388 (substitute* "configure"
1389 (("\\*\\) break ;;" line)
1390 (string-append "[A-Z]*) shift ;;\n"
1391 line)))
1392 #t))
1393 (add-before 'configure 'set-up-environment
1394 (lambda _
1395 (setenv "CC" "gcc")
1396 #t)))))
1397 (synopsis "Redirect any TCP connection through a proxy or proxy chain")
1398 (description "Proxychains-ng is a preloader which hooks calls to sockets
1399 in dynamically linked programs and redirects them through one or more SOCKS or
1400 HTTP proxies.")
1401 (home-page "https://github.com/rofl0r/proxychains-ng")
1402 (license license:gpl2+)))
1403
1404 (define-public enet
1405 (package
1406 (name "enet")
1407 (version "1.3.14")
1408 (source (origin
1409 (method url-fetch)
1410 (uri (string-append "http://enet.bespin.org/download/"
1411 "enet-" version ".tar.gz"))
1412 (sha256
1413 (base32
1414 "0w780zc6cy8yq4cskpphx0f91lzh51vh9lwyc5ll8hhamdxgbxlq"))))
1415 (build-system gnu-build-system)
1416 (native-inputs
1417 `(("pkg-config" ,pkg-config)))
1418 (synopsis "Network communication layer on top of UDP")
1419 (description
1420 "ENet's purpose is to provide a relatively thin, simple and robust network
1421 communication layer on top of UDP. The primary feature it provides is optional
1422 reliable, in-order delivery of packets. ENet omits certain higher level
1423 networking features such as authentication, server discovery, encryption, or
1424 other similar tasks that are particularly application specific so that the
1425 library remains flexible, portable, and easily embeddable.")
1426 (home-page "http://enet.bespin.org")
1427 (license license:expat)))
1428
1429 (define-public sslh
1430 (package
1431 (name "sslh")
1432 (version "1.20")
1433 (source
1434 (origin
1435 (method git-fetch)
1436 (uri (git-reference
1437 (url "https://github.com/yrutschle/sslh.git")
1438 (commit (string-append "v" version))))
1439 (file-name (git-file-name name version))
1440 (sha256
1441 (base32 "18zhkqlwfh6f5dg1a41a4p7p9g94dgb9nwls1ksy9r5yz174i2fx"))))
1442 (build-system gnu-build-system)
1443 (native-inputs
1444 `(;; Test dependencies.
1445 ("lcov" ,lcov)
1446 ("perl" ,perl)
1447 ("perl-conf-libconfig" ,perl-conf-libconfig)
1448 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
1449 ("perl-socket6" ,perl-socket6)
1450 ("psmisc" ,psmisc))) ; for ‘killall’
1451 (inputs
1452 `(("libcap" ,libcap)
1453 ("libconfig" ,libconfig)
1454 ("pcre" ,pcre)
1455 ("tcp-wrappers" ,tcp-wrappers)))
1456 (arguments
1457 '(#:phases
1458 (modify-phases %standard-phases
1459 (delete 'configure) ; no configure script
1460 (add-before 'check 'fix-tests
1461 (lambda _
1462 (substitute* "./t"
1463 (("\"/tmp") "$ENV{\"TMPDIR\"} . \"")
1464 ;; The Guix build environment lacks ‘ip6-localhost’.
1465 (("ip6-localhost") "localhost"))
1466 #t))
1467 ;; Many of these files are mentioned in the man page. Install them.
1468 (add-after 'install 'install-documentation
1469 (lambda* (#:key outputs #:allow-other-keys)
1470 (let* ((out (assoc-ref outputs "out"))
1471 (doc (string-append out "/share/doc/sslh")))
1472 (install-file "README.md" doc)
1473 (for-each
1474 (lambda (file)
1475 (install-file file (string-append doc "/examples")))
1476 (append (find-files "." "\\.cfg")
1477 (find-files "scripts"))))
1478 #t)))
1479 #:make-flags (list "CC=gcc"
1480 "USELIBCAP=1"
1481 "USELIBWRAP=1"
1482 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1483 #:test-target "test"))
1484 (home-page "https://www.rutschle.net/tech/sslh/README.html")
1485 (synopsis "Applicative network protocol demultiplexer")
1486 (description
1487 "sslh is a network protocol demultiplexer. It acts like a switchboard,
1488 accepting connections from clients on one port and forwarding them to different
1489 servers based on the contents of the first received data packet. Detection of
1490 common protocols like HTTP(S), SSL, SSH, OpenVPN, tinc, and XMPP is already
1491 implemented, but any other protocol that matches a regular expression can be
1492 added. sslh's name comes from its original application of serving both SSH and
1493 HTTPS on port 443, allowing SSH connections from inside corporate firewalls
1494 that block port 22.")
1495 (license (list license:bsd-2 ; tls.[ch]
1496 license:gpl2+)))) ; everything else
1497
1498 (define-public iperf
1499 (package
1500 (name "iperf")
1501 (version "3.7")
1502 (source (origin
1503 (method url-fetch)
1504 (uri (string-append "http://downloads.es.net/pub/iperf"
1505 "/iperf-" version ".tar.gz"))
1506 (sha256
1507 (base32
1508 "033is7b5grfbiil98jxlz4ixp9shm44x6hy8flpsyz1i4h108inq"))))
1509 (build-system gnu-build-system)
1510 (synopsis "TCP, UDP and SCTP bandwidth measurement tool")
1511 (description
1512 "iPerf is a tool to measure achievable bandwidth on IP networks. It
1513 supports tuning of various parameters related to timing, buffers and
1514 protocols (TCP, UDP, SCTP with IPv4 and IPv6). For each test it reports
1515 the bandwidth, loss, and other parameters.")
1516 (home-page "http://software.es.net/iperf/")
1517 (license (list license:bsd-3 ; Main distribution.
1518 license:ncsa ; src/{units,iperf_locale,tcp_window_size}.c
1519 license:expat ; src/{cjson,net}.[ch]
1520 license:public-domain)))) ; src/portable_endian.h
1521
1522 (define-public nethogs
1523 (package
1524 (name "nethogs")
1525 (version "0.8.5")
1526 (source (origin
1527 (method url-fetch)
1528 (uri (string-append "https://github.com/raboof/nethogs/archive/v"
1529 version ".tar.gz"))
1530 (sha256
1531 (base32
1532 "1k4x8r7s4dgcb6n2rjn28h2yyij92mwm69phncl3597cdxr954va"))
1533 (file-name (string-append name "-" version ".tar.gz"))))
1534 (build-system gnu-build-system)
1535 (inputs
1536 `(("libpcap" ,libpcap)
1537 ("ncurses" ,ncurses)))
1538 (arguments
1539 `(#:make-flags `("CC=gcc"
1540 ,(string-append "PREFIX=" %output))
1541 #:phases
1542 (modify-phases %standard-phases
1543 (delete 'configure)))) ; No ./configure script.
1544 (home-page "https://github.com/raboof/nethogs")
1545 (synopsis "Per-process bandwidth monitor")
1546 (description "NetHogs is a small 'net top' tool for Linux. Instead of
1547 breaking the traffic down per protocol or per subnet, like most tools do, it
1548 groups bandwidth by process.
1549
1550 NetHogs does not rely on a special kernel module to be loaded. If there's
1551 suddenly a lot of network traffic, you can fire up NetHogs and immediately see
1552 which PID is causing this. This makes it easy to identify programs that have
1553 gone wild and are suddenly taking up your bandwidth.")
1554 (license license:gpl2+)))
1555
1556 (define-public nzbget
1557 (package
1558 (name "nzbget")
1559 (version "21.0")
1560 (source
1561 (origin
1562 (method url-fetch)
1563 (uri (string-append "https://github.com/nzbget/nzbget/archive/v"
1564 version ".tar.gz"))
1565 (file-name (string-append name "-" version ".tar.gz"))
1566 (sha256
1567 (base32
1568 "0l3dzxz7d7jf6cyach41zirvsx1x0vs4nh053c0miycv7zjyrly7"))
1569 (modules '((guix build utils)))
1570 (snippet
1571 ;; Reported upstream as <https://github.com/nzbget/nzbget/pull/414>.
1572 '(begin
1573 (substitute* "daemon/connect/TlsSocket.cpp"
1574 (("gnutls_certificate-verification_status_print")
1575 "gnutls_certificate_verification_status_print"))
1576 #t))))
1577 (arguments
1578 `(#:configure-flags
1579 (list
1580 (string-append "--with-libcurses-includes="
1581 (assoc-ref %build-inputs "ncurses") "/include")
1582 (string-append "--with-libcurses-libraries="
1583 (assoc-ref %build-inputs "ncurses") "/lib")
1584 (string-append "--with-tlslib=GnuTLS"))))
1585 (build-system gnu-build-system)
1586 (inputs `(("gnutls" ,gnutls)
1587 ("libxml2" ,libxml2)
1588 ("ncurses" ,ncurses)
1589 ("zlib" ,zlib)))
1590 (native-inputs `(("pkg-config" ,pkg-config)))
1591 (home-page "https://github.com/nzbget/nzbget")
1592 (synopsis "Usenet binary file downloader")
1593 (description
1594 "NZBGet is a binary newsgrabber, which downloads files from Usenet based
1595 on information given in @code{nzb} files. NZBGet can be used in standalone
1596 and in server/client modes. In standalone mode, you pass NZBGet @command{nzb}
1597 files as command-line parameters and it downloads them and exits. NZBGet also
1598 contains a Web interface. Its server can be controlled through remote
1599 procedure calls (RPCs).")
1600 (license license:gpl2+)))
1601
1602 (define-public openvswitch
1603 (package
1604 (name "openvswitch")
1605 (version "2.12.0")
1606 (source (origin
1607 (method url-fetch)
1608 (uri (string-append
1609 "https://www.openvswitch.org/releases/openvswitch-"
1610 version ".tar.gz"))
1611 (sha256
1612 (base32
1613 "1y78ix5inhhcvicbvyy2ij38am1215nr55vydhab3d4065q45z8k"))))
1614 (build-system gnu-build-system)
1615 (arguments
1616 '(;; FIXME: many tests fail with:
1617 ;; […]
1618 ;; test -e $OVS_RUNDIR/ovs-vswitchd.pid
1619 ;; ovs-appctl -t ovs-vswitchd exit
1620 ;; hard failure
1621 #:tests? #f
1622 #:configure-flags
1623 '("--enable-shared"
1624 "--localstatedir=/var"
1625 "--with-dbdir=/var/lib/openvswitch")
1626 #:phases
1627 (modify-phases %standard-phases
1628 (replace 'install
1629 (lambda _
1630 (invoke "make"
1631 ;; Don't try to create directories under /var.
1632 "RUNDIR=/tmp"
1633 "PKIDIR=/tmp"
1634 "LOGDIR=/tmp"
1635 "DBDIR=/tmp"
1636 "install"))))))
1637 (native-inputs
1638 `(("perl" ,perl)
1639 ("pkg-config" ,pkg-config)
1640 ("python" ,python-2)
1641 ;; for testing
1642 ("util-linux" ,util-linux)))
1643 (propagated-inputs
1644 `(("python-six" ,python2-six)))
1645 (inputs
1646 `(("libcap-ng" ,libcap-ng)
1647 ("openssl" ,openssl)))
1648 (synopsis "Virtual network switch")
1649 (home-page "https://www.openvswitch.org/")
1650 (description
1651 "Open vSwitch is a multilayer virtual switch. It is designed to enable
1652 massive network automation through programmatic extension, while still
1653 supporting standard management interfaces and protocols (e.g. NetFlow, sFlow,
1654 IPFIX, RSPAN, CLI, LACP, 802.1ag).")
1655 (license ; see debian/copyright for detail
1656 (list license:lgpl2.1 ; xenserver and utilities/bugtool
1657 license:gpl2 ; datapath
1658 license:bsd-2 license:bsd-3
1659 license:asl2.0)))) ; all other
1660
1661 (define-public python-ipy
1662 (package
1663 (name "python-ipy")
1664 (version "1.00")
1665 (source (origin
1666 (method url-fetch)
1667 (uri (pypi-uri "IPy" version))
1668 (sha256
1669 (base32
1670 "08d6kcacj67mvh0b6y765ipccy6gi4w2ndd4v1l3im2qm1cgcarg"))))
1671 (build-system python-build-system)
1672 (home-page "https://github.com/autocracy/python-ipy/")
1673 (synopsis "Python class and tools for handling IP addresses and networks")
1674 (description "The @code{IP} class allows a comfortable parsing and
1675 handling for most notations in use for IPv4 and IPv6 addresses and
1676 networks.")
1677 (license license:bsd-3)))
1678
1679 (define-public python2-ipy
1680 (package-with-python2 python-ipy))
1681
1682 (define-public speedtest-cli
1683 (package
1684 (name "speedtest-cli")
1685 (version "2.1.2")
1686 (source
1687 (origin
1688 (method git-fetch)
1689 (uri (git-reference
1690 (url "https://github.com/sivel/speedtest-cli")
1691 (commit (string-append "v" version))))
1692 (file-name (git-file-name name version))
1693 (sha256
1694 (base32 "1456yly6iym2c9bl6pi4sz8xbw34bm2dxm1vzpydsd6jazwpmy26"))))
1695 (build-system python-build-system)
1696 (home-page "https://github.com/sivel/speedtest-cli")
1697 (synopsis "Internet bandwidth tester")
1698 (description
1699 "Command line interface for testing internet bandwidth using
1700 speedtest.net.")
1701 (license license:asl2.0)))
1702
1703 (define-public tftp-hpa
1704 (package
1705 (name "tftp-hpa")
1706 (version "5.2")
1707 (source (origin
1708 (method url-fetch)
1709 (uri (string-append "mirror://kernel.org/software/"
1710 "network/tftp/tftp-hpa/tftp-hpa-" version
1711 ".tar.xz"))
1712 (sha256
1713 (base32
1714 "12vidchglhyc20znq5wdsbhi9mqg90jnl7qr9qs8hbvaz4fkdvmg"))))
1715 (build-system gnu-build-system)
1716 (arguments `(#:tests? #f)) ; no test target
1717 (synopsis "HPA's tftp client")
1718 (description
1719 "This is a tftp client derived from OpenBSD tftp with some extra options
1720 added and bugs fixed. The source includes readline support but it is not
1721 enabled due to license conflicts between the BSD advertising clause and the GPL.")
1722 (home-page "http://git.kernel.org/cgit/network/tftp/tftp-hpa.git/about/")
1723 ;; Some source files are distributed under a 3-clause BSD license, and
1724 ;; others under a 4-clause BSD license. Refer to the files in the source
1725 ;; distribution for clarification.
1726 (license (list license:bsd-3 license:bsd-4))))
1727
1728 (define-public pidentd
1729 (package
1730 (name "pidentd")
1731 (version "3.0.19")
1732 (source
1733 (origin
1734 (method url-fetch)
1735 (uri (string-append "https://github.com/ptrrkssn/pidentd/archive/"
1736 "v" version ".tar.gz"))
1737 (file-name (string-append name "-" version ".tar.gz"))
1738 (sha256
1739 (base32
1740 "0y3kd1bkydqkpc1qdff24yswysamsqivvadjy0468qri5730izgc"))))
1741 (build-system gnu-build-system)
1742 (arguments
1743 `(#:tests? #f)) ; No tests are included
1744 (inputs
1745 `(("openssl" ,openssl-1.0))) ;for the DES library
1746 (home-page "https://www.lysator.liu.se/~pen/pidentd/")
1747 (synopsis "Small Ident Daemon")
1748 (description
1749 "@dfn{Pidentd} (Peter's Ident Daemon) is a identd, which implements a
1750 identification server. Pidentd looks up specific TCP/IP connections and
1751 returns the user name and other information about the connection.")
1752 (license license:public-domain)))
1753
1754 (define-public spiped
1755 (package
1756 (name "spiped")
1757 (version "1.6.0")
1758 (source (origin
1759 (method url-fetch)
1760 (uri (string-append "https://www.tarsnap.com/spiped/spiped-"
1761 version ".tgz"))
1762 (sha256
1763 (base32
1764 "1r51rdcl7nib1yv3yvgd5alwlkkwmr387brqavaklb0p2bwzixz6"))))
1765 (build-system gnu-build-system)
1766 (arguments
1767 '(#:test-target "test"
1768 #:make-flags (let* ((out (assoc-ref %outputs "out"))
1769 (bindir (string-append out "/bin"))
1770 (man1dir (string-append out "/share/man/man1")))
1771 (list "CC=gcc" ; It tries to invoke `c99`.
1772 (string-append "BINDIR=" bindir)
1773 (string-append "MAN1DIR=" man1dir)))
1774 #:phases
1775 (modify-phases %standard-phases
1776 (add-after 'unpack 'patch-command-invocations
1777 (lambda _
1778 (substitute* '("Makefile"
1779 "libcperciva/cpusupport/Build/cpusupport.sh"
1780 "libcperciva/POSIX/posix-cflags.sh"
1781 "libcperciva/POSIX/posix-l.sh")
1782 (("command -p") ""))
1783 #t))
1784 (delete 'configure) ; No ./configure script.
1785 (add-after 'install 'install-more-docs
1786 (lambda* (#:key outputs #:allow-other-keys)
1787 (let* ((out (assoc-ref %outputs "out"))
1788 (misc (string-append out "/share/doc/spiped")))
1789 (install-file "DESIGN.md" misc)
1790 #t))))))
1791 (native-inputs
1792 `(("procps" ,procps))) ; `ps` is used by the test suite.
1793 (inputs
1794 `(("openssl" ,openssl)))
1795 (home-page "https://www.tarsnap.com/spiped.html")
1796 (synopsis "Create secure pipes between sockets")
1797 (description "Spiped (pronounced \"ess-pipe-dee\") is a utility for creating
1798 symmetrically encrypted and authenticated pipes between socket addresses, so
1799 that one may connect to one address (e.g., a UNIX socket on localhost) and
1800 transparently have a connection established to another address (e.g., a UNIX
1801 socket on a different system). This is similar to 'ssh -L' functionality, but
1802 does not use SSH and requires a pre-shared symmetric key.")
1803 (license license:bsd-2)))
1804
1805 (define-public quagga
1806 (package
1807 (name "quagga")
1808 (version "1.2.4")
1809 (source (origin
1810 (method url-fetch)
1811 (uri (string-append "mirror://savannah/quagga/quagga-"
1812 version ".tar.gz"))
1813 (sha256
1814 (base32
1815 "1lsksqxij5f1llqn86pkygrf5672kvrqn1kvxghi169hqf1c0r73"))
1816 (patches
1817 (search-patches "quagga-reproducible-build.patch"))))
1818 (build-system gnu-build-system)
1819 (native-inputs `(("pkg-config" ,pkg-config)
1820 ("perl" ,perl)
1821 ("dejagnu" ,dejagnu)))
1822 (inputs `(("readline" ,readline)
1823 ("c-ares" ,c-ares)))
1824 (synopsis "Routing Software Suite")
1825 (description "Quagga is a routing software suite, providing implementations
1826 of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for Unix platforms.
1827
1828 The Quagga architecture consists of a core daemon, @command{zebra}, which
1829 acts as an abstraction layer to the underlying Unix kernel and presents the
1830 Zserv API over a Unix or TCP stream to Quagga clients. It is these Zserv
1831 clients which typically implement a routing protocol and communicate routing
1832 updates to the zebra daemon.")
1833 (home-page "https://www.nongnu.org/quagga/")
1834 (license license:gpl2+)))
1835
1836 (define-public thc-ipv6
1837 (let ((revision "0")
1838 (commit "4bb72573e0950ce6f8ca2800a10748477020029e"))
1839 (package
1840 (name "thc-ipv6")
1841 (version (git-version "3.4" revision commit))
1842 (source (origin
1843 (method git-fetch)
1844 (uri (git-reference
1845 (url "https://github.com/vanhauser-thc/thc-ipv6.git")
1846 (commit commit)))
1847 (file-name (git-file-name name version))
1848 (sha256
1849 (base32
1850 "1x5i6vbsddqc2yks7r1a2fw2fk16qxvd6hpzh1lykjfpkal8fdir"))))
1851 (build-system gnu-build-system)
1852 (arguments
1853 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1854 #:tests? #f ; No test suite.
1855 #:phases
1856 (modify-phases %standard-phases
1857 (delete 'configure) ; No ./configure script.
1858 (add-before 'build 'patch-paths
1859 (lambda _
1860 (substitute* "Makefile"
1861 (("/bin/echo") "echo"))
1862 #t))
1863 (add-after 'install 'install-more-docs
1864 (lambda* (#:key outputs #:allow-other-keys)
1865 (let* ((out (assoc-ref outputs "out"))
1866 (doc (string-append out "/share/thc-ipv6/doc")))
1867 (install-file "README" doc)
1868 (install-file "HOWTO-INJECT" doc)
1869 #t))))))
1870 ;; TODO Add libnetfilter-queue once packaged.
1871 (inputs
1872 `(("libpcap" ,libpcap)
1873 ("openssl" ,openssl)
1874 ("perl" ,perl)))
1875 (home-page "https://github.com/vanhauser-thc/thc-ipv6")
1876 (synopsis "IPv6 security research toolkit")
1877 (description "The THC IPv6 Toolkit provides command-line tools and a library
1878 for researching IPv6 implementations and deployments. It requires Linux 2.6 or
1879 newer and only works on Ethernet network interfaces.")
1880 ;; AGPL 3 with exception for linking with OpenSSL. See the 'LICENSE' file in
1881 ;; the source distribution for more information.
1882 (license license:agpl3))))
1883
1884 (define-public bmon
1885 (package
1886 (name "bmon")
1887 (version "4.0")
1888 (source
1889 (origin
1890 (method url-fetch)
1891 (uri (string-append "https://github.com/tgraf/bmon/releases/download/v"
1892 version "/bmon-" version ".tar.gz"))
1893 (sha256
1894 (base32
1895 "0ylzriv4pwh76344abzl1w219x188gshbycbna35gsyfp09c7z82"))))
1896 (build-system gnu-build-system)
1897 (inputs
1898 `(("libconfuse" ,libconfuse)
1899 ("libnl" ,libnl)
1900 ("ncurses" ,ncurses)))
1901 (native-inputs
1902 `(("pkg-config" ,pkg-config)))
1903 (synopsis "Bandwidth monitor")
1904 (description "bmon is a monitoring and debugging tool to capture
1905 networking-related statistics and prepare them visually in a human-friendly
1906 way. It features various output methods including an interactive curses user
1907 interface and a programmable text output for scripting.")
1908 (home-page "https://github.com/tgraf/bmon")
1909 ;; README.md mentions both the 2-clause BSD and expat licenses, but all
1910 ;; the source files only have expat license headers. Upstream has been
1911 ;; contacted for clarification: https://github.com/tgraf/bmon/issues/59
1912 ;; Update the license field when upstream responds.
1913 (license (list license:bsd-2
1914 license:expat))))
1915
1916 (define-public libnet
1917 (package
1918 (name "libnet")
1919 (version "1.2-rc3")
1920 (source
1921 (origin
1922 (method git-fetch)
1923 (uri (git-reference
1924 (url "https://github.com/sam-github/libnet")
1925 (commit (string-append "libnet-" version))))
1926 (file-name (git-file-name name version))
1927 (sha256
1928 (base32
1929 "0cy8w4g5rv963v4p6iq3333kxgdddx2lywp70xf62553a25xhhs4"))))
1930 (build-system gnu-build-system)
1931 (arguments
1932 `(#:phases
1933 (modify-phases %standard-phases
1934 (add-after 'unpack 'chdir
1935 (lambda _ (chdir "libnet") #t))
1936 (add-before 'build 'build-doc
1937 (lambda* (#:key make-flags #:allow-other-keys)
1938 (apply invoke "make" "-C" "doc" "doc"
1939 make-flags))))))
1940 (native-inputs
1941 `(("autoconf" ,autoconf)
1942 ("automake" ,automake)
1943 ("libtool" ,libtool)
1944 ("doxygen" ,doxygen)))
1945 (home-page "https://sourceforge.net/projects/libnet-dev/")
1946 (synopsis "Framework for low-level network packet construction")
1947 (description
1948 "Libnet provides a fairly portable framework for network packet
1949 construction and injection. It features portable packet creation interfaces
1950 at the IP layer and link layer, as well as a host of supplementary
1951 functionality. Using libnet, quick and simple packet assembly applications
1952 can be whipped up with little effort.")
1953 (license license:bsd-2)))
1954
1955 (define-public mtr
1956 (package
1957 (name "mtr")
1958 (version "0.93")
1959 (source
1960 (origin
1961 (method url-fetch)
1962 (uri (string-append "ftp://ftp.bitwizard.nl/mtr/"
1963 "mtr-" version ".tar.gz"))
1964 (sha256
1965 (base32 "03gid8g4r6a9r40855s4345xm1bylj2kfqkicjwxpmvvccyng712"))))
1966 (build-system gnu-build-system)
1967 (inputs
1968 `(("libcap" ,libcap)
1969 ("ncurses" ,ncurses)))
1970 (arguments
1971 `(#:tests? #f)) ; tests require network access
1972 (home-page "https://www.bitwizard.nl/mtr/")
1973 (synopsis "Network diagnostic tool")
1974 (description
1975 "@acronym{mtr, My TraceRoute} combines the functionality of the
1976 @command{traceroute} and @command{ping} programs in a single network diagnostic
1977 tool. @command{mtr} can use several network protocols to detect intermediate
1978 routers (or @dfn{hops}) between the local host and a user-specified destination.
1979 It then continually measures the response time and packet loss at each hop, and
1980 displays the results in real time.")
1981 (license license:gpl2+)))
1982
1983 (define-public strongswan
1984 (package
1985 (name "strongswan")
1986 (version "5.8.2")
1987 (source
1988 (origin
1989 (method url-fetch)
1990 (uri (string-append "https://download.strongswan.org/strongswan-"
1991 version ".tar.bz2"))
1992 (sha256
1993 (base32 "03j3fx357bh89n44a5v9wdc92azdx2d37j7jmlyr4z1kwzdhv446"))))
1994 (build-system gnu-build-system)
1995 (arguments
1996 `(#:phases
1997 (modify-phases %standard-phases
1998 (add-before 'build 'patch-command-file-names
1999 (lambda* (#:key inputs #:allow-other-keys)
2000 (substitute* "src/libstrongswan/utils/process.c"
2001 (("/bin/sh")
2002 (string-append (assoc-ref inputs "bash") "/bin/sh")))
2003
2004 (substitute* "src/libstrongswan/tests/suites/test_process.c"
2005 (("/bin/sh") (which "sh"))
2006 (("/bin/echo") (which "echo"))
2007 (("cat") (which "cat")))
2008 #t))
2009 (add-before 'check 'set-up-test-environment
2010 (lambda* (#:key inputs #:allow-other-keys)
2011 (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
2012 "/share/zoneinfo"))
2013 #t)))
2014 #:configure-flags
2015 (list
2016 ;; Disable bsd-4 licensed plugins.
2017 "--disable-des"
2018 "--disable-blowfish")))
2019 (inputs
2020 `(("curl" ,curl)
2021 ("gmp" ,gmp)
2022 ("libgcrypt" ,libgcrypt)
2023 ("openssl" ,openssl)))
2024 (native-inputs
2025 `(("coreutils" ,coreutils)
2026 ("tzdata" ,tzdata-for-tests)))
2027 (synopsis "IKEv1/v2 keying daemon")
2028 (description "StrongSwan is an IPsec implementation originally based upon
2029 the FreeS/WAN project. It contains support for IKEv1, IKEv2, MOBIKE, IPv6,
2030 NAT-T and more.")
2031 (home-page "https://strongswan.org/")
2032 (license
2033 (list license:gpl2+
2034 ;; src/aikgen/*
2035 ;; src/libcharon/plugins/dnscert/*
2036 ;; src/libcharon/plugins/ext_auth/*
2037 ;; src/libcharon/plugins/vici/ruby/*
2038 ;; src/libcharon/plugins/xauth_pam/xauth_pam_listener.[ch]
2039 license:expat
2040 ;; src/inclue/sys/*
2041 license:bsd-3
2042 ;; src/libstrongswan/plugins/sha3/sha3_keccak.c
2043 license:public-domain
2044 ;; src/libstrongswan/plugins/pkcs11/pkcs11.h
2045 (license:non-copyleft
2046 "file://src/libstrongswan/plugins/pkcs11/pkcs11.h"
2047 "pkcs11 contains a unknown permissive license. View the specific
2048 file for more details.")
2049 ;; These files are not included in the
2050 ;; build, they are disabled through
2051 ;; options to ./configure
2052 ;;
2053 ;; src/libstrongswan/plugins/blowfish/bf_enc.c
2054 ;; src/libstrongswan/plugins/blowfish/bf_locl.h
2055 ;; src/libstrongswan/plugins/blowfish/bf_pi.h
2056 ;; src/libstrongswan/plugins/blowfish/bf_skey.c
2057 ;; src/libstrongswan/plugins/blowfish/blowfish_crypter.c
2058 ;; src/libstrongswan/plugins/des/des_crypter.c
2059 license:bsd-4))))
2060
2061 (define-public amule
2062 (package
2063 (name "amule")
2064 (version "2.3.2")
2065 (source (origin
2066 (method git-fetch)
2067 (uri (git-reference
2068 (url "https://github.com/amule-project/amule")
2069 (commit version)))
2070 (file-name (git-file-name name version))
2071 (sha256
2072 (base32
2073 "010wxm6g9f92x6fympj501zbnjka32rzbx0sk3a2y4zpih5d2nsn"))
2074 ;; Patch for adopting crypto++ >= 6.0.
2075 (patches (search-patches "amule-crypto-6.patch"))))
2076 (build-system gnu-build-system)
2077 (arguments
2078 `(#:phases
2079 (modify-phases %standard-phases
2080 (delete 'bootstrap) ; bootstrap phase runs too early.
2081 (add-after 'patch-source-shebangs 'autogen
2082 (lambda _
2083 (invoke "sh" "autogen.sh")
2084 #t)))
2085 #:configure-flags
2086 '("--disable-rpath"
2087 "--enable-wxcas"
2088 "--enable-cas"
2089 "--enable-alc"
2090 "--enable-alcc"
2091 "--enable-xas"
2092 "--enable-amulecmd"
2093 "--enable-geoip"
2094 "--enable-ccache"
2095 "--enable-nls"
2096 "--enable-optimize"
2097 "--enable-amule-gui"
2098 "--enable-amule-daemon"
2099 "--enable-webserver"
2100 "--with-denoise-level=0")))
2101 (native-inputs
2102 `(("autoconf" ,autoconf)
2103 ("automake" ,automake)
2104 ("gettext-minimal" ,gettext-minimal)
2105 ("perl" ,perl)))
2106 (inputs
2107 `(("zlib" ,zlib)
2108 ("crypto++" ,crypto++)
2109 ("libpng" ,libpng)
2110 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2111 (home-page "http://amule.org/")
2112 (synopsis "Peer-to-peer client for the eD2K and Kademlia networks")
2113 (description
2114 "aMule is an eMule-like client for the eD2k and Kademlia peer-to-peer
2115 file sharing networks. It includes a graphical user interface (GUI), a daemon
2116 allowing you to run a client with no graphical interface, and a Web GUI for
2117 remote access. The @command{amulecmd} command allows you to control aMule
2118 remotely.")
2119 (license license:gpl2+)))
2120
2121 (define-public zyre
2122 (package
2123 (name "zyre")
2124 (version "2.0.0")
2125 (source (origin
2126 (method url-fetch)
2127 (uri
2128 (string-append "https://github.com/zeromq/zyre/releases/download/v"
2129 version "/" name "-" version ".tar.gz"))
2130 (sha256
2131 (base32
2132 "0qz2730bng1gs9xbqxhkw88qbsmszgmmrl2g9k6xrg6r3bqvsdc7"))))
2133 (build-system gnu-build-system)
2134 (arguments
2135 `(;; Ensure the kernel headers are treated as system headers to suppress
2136 ;; harmless -Werror=pedantic warnings.
2137 #:make-flags (list (string-append "C_INCLUDE_PATH="
2138 (assoc-ref %build-inputs "kernel-headers")
2139 "/include"))))
2140 (inputs `(("zeromq" ,zeromq)
2141 ("czmq" ,czmq)
2142 ("libsodium" ,libsodium)))
2143 (synopsis "Framework for proximity-based peer-to-peer applications")
2144 (description "Zyre provides reliable group messaging over local area
2145 networks using zeromq. It has these key characteristics:
2146
2147 @itemize
2148 @item Zyre needs no administration or configuration.
2149 @item Peers may join and leave the network at any time.
2150 @item Peers talk to each other without any central brokers or servers.
2151 @item Peers can talk directly to each other.
2152 @item Peers can join groups, and then talk to groups.
2153 @item Zyre is reliable, and loses no messages even when the network is heavily loaded.
2154 @item Zyre is fast and has low latency, requiring no consensus protocols.
2155 @item Zyre is designed for WiFi networks, yet also works well on Ethernet networks.
2156 @end itemize")
2157 (home-page "https://github.com/zeromq/zyre")
2158 (license license:mpl2.0)))
2159
2160 (define-public can-utils
2161 (package
2162 (name "can-utils")
2163 (version "2018.02.0")
2164 (source (origin
2165 (method git-fetch)
2166 (uri (git-reference
2167 (url "https://github.com/linux-can/can-utils.git")
2168 (commit (string-append "v" version))))
2169 (file-name (git-file-name name version))
2170 (sha256
2171 (base32
2172 "0r0zkm67bdcmbfypjr7z041d4zp0xzb379dyl8cvhmflh12fd2jb"))))
2173 (build-system gnu-build-system)
2174 (arguments
2175 `(#:tests? #f ; No tests exist.
2176 #:make-flags (list "CC=gcc"
2177 (string-append "PREFIX="
2178 (assoc-ref %outputs "out")))
2179 #:phases
2180 (modify-phases %standard-phases
2181 (delete 'bootstrap)
2182 (delete 'configure))))
2183 (home-page "https://github.com/linux-can/can-utils")
2184 (synopsis "CAN utilities")
2185 (description "This package provides CAN utilities in the following areas:
2186
2187 @itemize
2188 @item Basic tools to display, record, generate and replay CAN traffic
2189 @item CAN access via IP sockets
2190 @item CAN in-kernel gateway configuration
2191 @item CAN bus measurement and testing
2192 @item ISO-TP (ISO15765-2:2016 - this means messages with a body larger than
2193 eight bytes) tools
2194 @item Log file converters
2195 @item Serial Line Discipline configuration for slcan driver
2196 @end itemize")
2197 ;; Either BSD-3 or GPL-2 can be used.
2198 (license (list license:bsd-3 license:gpl2))))
2199
2200 (define-public asio
2201 (package
2202 (name "asio")
2203 (version "1.12.2")
2204 (source
2205 (origin
2206 (method url-fetch)
2207 (uri (string-append "mirror://sourceforge/asio/asio/"
2208 version " (Stable)/asio-" version ".tar.bz2"))
2209 (sha256
2210 (base32 "1akray4l3hgahmb92sbvsqg128c7g7s92jrkf1sp1fjnfjrxq9sf"))))
2211 (build-system gnu-build-system)
2212 (inputs
2213 `(("boost" ,boost)
2214 ("openssl" ,openssl)))
2215 (arguments
2216 `(#:configure-flags
2217 (list
2218 (string-append "--with-boost=" (assoc-ref %build-inputs "boost"))
2219 (string-append "--with-openssl=" (assoc-ref %build-inputs "openssl")))))
2220 (home-page "https://think-async.com/Asio")
2221 (synopsis "C++ library for ASynchronous network I/O")
2222 (description "Asio is a cross-platform C++ library for network and
2223 low-level I/O programming that provides developers with a consistent
2224 asynchronous model using a modern C++ approach.")
2225 (license license:boost1.0)))
2226
2227 (define-public shadowsocks
2228 ;; There are some security fixes after the last release.
2229 (let* ((commit "e332ec93e9c90f1cbee676b022bf2c5d5b7b1239")
2230 (revision "0")
2231 (version (git-version "2.8.2" revision commit)))
2232 (package
2233 (name "shadowsocks")
2234 (version version)
2235 (home-page "https://github.com/shadowsocks/shadowsocks")
2236 (source (origin
2237 (method git-fetch)
2238 (uri (git-reference
2239 (url home-page)
2240 (commit commit)))
2241 (sha256
2242 (base32
2243 "1idd9b4f2pnhcpk1bh030hqg5zq25gkwxd53xi3c0cj242w7sp2j"))
2244 (file-name (git-file-name name version))))
2245 (build-system python-build-system)
2246 (synopsis "Fast tunnel proxy that helps you bypass firewalls")
2247 (description
2248 "This package is a fast tunnel proxy that helps you bypass firewalls.
2249
2250 Features:
2251 @itemize
2252 @item TCP & UDP support
2253 @item User management API
2254 @item TCP Fast Open
2255 @item Workers and graceful restart
2256 @item Destination IP blacklist
2257 @end itemize")
2258 (license license:asl2.0))))
2259
2260 (define-public net-snmp
2261 (package
2262 (name "net-snmp")
2263 (version "5.8")
2264 (source (origin
2265 (method url-fetch)
2266 (uri (string-append "mirror://sourceforge/net-snmp/net-snmp/"
2267 version "/net-snmp-" version ".tar.gz"))
2268 (sha256
2269 (base32
2270 "1pvajzj9gmj56dmwix0ywmkmy2pglh6nny646hkm7ghfhh03bz5j"))
2271 (modules '((guix build utils)))
2272 (snippet
2273 '(begin
2274 ;; Drop bundled libraries.
2275 (delete-file-recursively "snmplib/openssl")
2276 #t))))
2277 (build-system gnu-build-system)
2278 (arguments
2279 `(#:test-target "test"
2280 ;; XXX: With parallel build enabled, Perl modules may not get linked with
2281 ;; libnetsnmp. See e.g. <https://bugzilla.novell.com/show_bug.cgi?id=819497>.
2282 #:parallel-build? #f
2283 #:configure-flags
2284 (list (string-append "LDFLAGS=-Wl,-rpath="
2285 (assoc-ref %outputs "out")
2286 "/lib")
2287 "--with-logfile=/var/log/snmpd.log"
2288 (string-append "--with-openssl="
2289 (assoc-ref %build-inputs "openssl")))
2290 #:phases
2291 (modify-phases %standard-phases
2292 (add-after 'unpack 'patch-tests
2293 (lambda* (#:key inputs #:allow-other-keys)
2294 (substitute* "testing/fulltests/support/simple_TESTCONF.sh"
2295 (("NETSTAT=\"\"")
2296 (string-append "NETSTAT=\"" (which "netstat") "\"")))
2297 (substitute* '("testing/fulltests/default/T065agentextend_simple"
2298 "testing/fulltests/default/T115agentxperl_simple")
2299 (("/usr/bin/env") (which "env")))
2300 (substitute* "testing/fulltests/default/T065agentextend_sh_simple"
2301 (("/bin/sh") (which "sh")))
2302 ;; These tests require network access.
2303 (for-each delete-file
2304 '("testing/fulltests/default/T070com2sec_simple"
2305 "testing/fulltests/default/T071com2sec6_simple"))
2306 #t))
2307 (add-after 'unpack 'patch-Makefile.PL
2308 (lambda* (#:key outputs #:allow-other-keys)
2309 (substitute* "Makefile.in"
2310 (("Makefile.PL -NET")
2311 (string-append "Makefile.PL PREFIX="
2312 (assoc-ref outputs "out")
2313 " INSTALLDIRS=site" " NO_PERLLOCAL=1"
2314 " -NET")))
2315 #t)))))
2316 (inputs
2317 `(("perl" ,perl)
2318 ("openssl" ,openssl)
2319 ("libnl" ,libnl)))
2320 ;; These inputs are only needed for tests.
2321 (native-inputs
2322 `(("net-tools" ,net-tools)
2323 ("coreutils" ,coreutils)
2324 ("grep" ,grep)))
2325 (home-page "http://www.net-snmp.org/")
2326 (synopsis "Simple Network Management Protocol library and tools")
2327 (description "The @dfn{Simple Network Management Protocol} (SNMP) is a
2328 widely used protocol for monitoring the health and welfare of network
2329 equipment (e.g. routers), computer equipment and even devices like UPSs.
2330 Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and
2331 SNMP v3 using both IPv4 and IPv6.")
2332 ;; This only affects OpenBSD
2333 ;; https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8100
2334 (properties `((lint-hidden-cve . ("CVE-2015-8100"))))
2335 (license (list license:bsd-3
2336 (license:non-copyleft
2337 "http://www.net-snmp.org/about/license.html"
2338 "CMU/UCD copyright notice")))))
2339
2340 (define-public ubridge
2341 (package
2342 (name "ubridge")
2343 (version "0.9.16")
2344 (source
2345 (origin
2346 (method git-fetch)
2347 (uri (git-reference
2348 (url "https://github.com/GNS3/ubridge.git")
2349 (commit (string-append "v" version))))
2350 (file-name (git-file-name name version))
2351 (sha256
2352 (base32 "1bind7ylgxs743vfdmpdrpp4iamy461bc3i7nxza91kj7hyyjz6h"))))
2353 (build-system gnu-build-system)
2354 (arguments
2355 `(#:tests? #f ; no tests
2356 #:make-flags '("CC=gcc")
2357 #:phases
2358 (modify-phases %standard-phases
2359 (delete 'configure) ; no configure script
2360 (add-before 'install 'set-bindir
2361 (lambda* (#:key inputs outputs #:allow-other-keys)
2362 (let ((bin (string-append (assoc-ref outputs "out")
2363 "/bin")))
2364 (mkdir-p bin)
2365 (substitute* "Makefile"
2366 (("\\$\\(BINDIR\\)") bin)
2367 (("\tsetcap cap_net.*$") "")))
2368 #t)))))
2369 (inputs
2370 `(("libpcap" ,libpcap)))
2371 (home-page "https://github.com/GNS3/ubridge/")
2372 (synopsis "Bridge for UDP tunnels, Ethernet, TAP and VMnet interfaces")
2373 (description "uBridge is a simple program to create user-land bridges
2374 between various technologies. Currently, bridging between UDP tunnels,
2375 Ethernet and TAP interfaces is supported. Packet capture is also supported.")
2376 (license license:gpl3+)))
2377
2378 (define-public hcxtools
2379 (package
2380 (name "hcxtools")
2381 (version "5.2.0")
2382 (source
2383 (origin
2384 (method git-fetch)
2385 (uri (git-reference
2386 (url "https://github.com/ZerBea/hcxtools.git")
2387 (commit version)))
2388 (sha256
2389 (base32 "0k2qlq9hz5zc21nyc6yrnfqzga7hydn5mm0x3rpl2fhkwl81lxcn"))
2390 (file-name (git-file-name name version))))
2391 (build-system gnu-build-system)
2392 (inputs
2393 `(("curl" ,curl)
2394 ("libpcap" ,libpcap)
2395 ("openssl" ,openssl)
2396 ("zlib" ,zlib)))
2397 (arguments
2398 `(#:make-flags
2399 (list "CC=gcc"
2400 (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
2401 #:tests? #f ; no test suite
2402 #:phases
2403 (modify-phases %standard-phases
2404 (delete 'configure)
2405 (add-after 'unpack 'set-environment
2406 (lambda* (#:key inputs #:allow-other-keys)
2407 (setenv "C_INCLUDE_PATH"
2408 (string-append (assoc-ref inputs "curl") "/include:"
2409 (assoc-ref inputs "libpcap") "/include:"
2410 (assoc-ref inputs "openssl") "/include:"
2411 (assoc-ref inputs "zlib") "/include"))
2412 #t)))))
2413 (home-page "https://github.com/ZerBea/hcxtools")
2414 (synopsis "Capture wlan traffic to hashcat and John the Ripper")
2415 (description
2416 "This package contains a small set of tools to capture and convert
2417 packets from wireless devices for use with hashcat or John the Ripper.")
2418 (license license:expat)))
2419
2420 (define-public hcxdumptool
2421 (package
2422 (name "hcxdumptool")
2423 (version "5.2.0")
2424 (source
2425 (origin
2426 (method git-fetch)
2427 (uri (git-reference
2428 (url "https://github.com/ZerBea/hcxdumptool.git")
2429 (commit version)))
2430 (sha256
2431 (base32 "0pg1pvg029gm4rj0fj5kcsjb32hixgn4cxsgiir7spkmacf1qm4q"))
2432 (file-name (git-file-name name version))))
2433 (build-system gnu-build-system)
2434 (arguments
2435 `(#:make-flags
2436 (list "CC=gcc"
2437 (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin"))
2438 #:tests? #f ; no test suite
2439 #:phases
2440 (modify-phases %standard-phases
2441 (delete 'configure))))
2442 (home-page "https://github.com/ZerBea/hcxdumptool")
2443 (synopsis "Small tool to capture packets from wlan devices")
2444 (description
2445 "Small tool to capture packets from WLAN devices. After capturing,
2446 upload the \"uncleaned\" cap to @url{https://wpa-sec.stanev.org/?submit} to
2447 see if the access point or the client is vulnerable to a dictionary attack.
2448 Convert the cap file to hccapx format and/or to WPA-PMKID-PBKDF2
2449 hashline (16800) with @command{hcxpcaptool} from the @code{hcxtools} package
2450 and check if the WLAN key or the master key was transmitted unencrypted.")
2451 (license license:expat)))
2452
2453 (define-public dante
2454 (package
2455 (name "dante")
2456 (version "1.4.2")
2457 (source
2458 (origin
2459 (method url-fetch)
2460 (uri (string-append "https://www.inet.no/dante/files/dante-"
2461 version ".tar.gz"))
2462 (sha256
2463 (base32
2464 "19rqzj167q73ag20zxpvswhkk0bj56r5maf83v5016sw7vrcz5sc"))))
2465 (build-system gnu-build-system)
2466 (arguments
2467 ;; XXX: The dynamic socks library doesn't work with 'libc.so' (GNU ld
2468 ;; script). When preloading is enabled, 'sockd' failed with:
2469 ;; … Failed to open library "libc.so": …: invalid ELF header
2470 '(#:configure-flags '("--disable-preload")))
2471 (home-page "https://www.inet.no/dante/")
2472 (synopsis "SOCKS server and client")
2473 (description "Dante is a SOCKS client and server implementation. It can
2474 be installed on a machine with access to an external TCP/IP network and will
2475 allow all other machines, without direct access to that network, to be relayed
2476 through the machine the Dante server is running on. The external network will
2477 never see any machines other than the one Dante is running on.")
2478 (license (license:non-copyleft "file://LICENSE"))))
2479
2480 (define-public restbed
2481 (let ((commit "6eb385fa9051203f28bf96cc1844bbb5a9a6481f"))
2482 (package
2483 (name "restbed")
2484 (version (git-version "4.6" "1" commit))
2485 (source
2486 (origin
2487 (method git-fetch)
2488 (uri (git-reference
2489 (url "https://github.com/Corvusoft/restbed/")
2490 (commit commit)))
2491 (file-name (string-append name "-" version ".tar.gz"))
2492 (sha256
2493 (base32 "0k60i5drklqqrb4khb25fzkgz9y0sncxf1sp6lh2bm1m0gh0661n"))))
2494 (build-system cmake-build-system)
2495 (inputs
2496 `(("asio" ,asio)
2497 ("catch" ,catch-framework)
2498 ("openssl" ,openssl)))
2499 (arguments
2500 `(#:tests? #f
2501 #:configure-flags
2502 '("-DBUILD_TESTS=NO"
2503 "-DBUILD_EXAMPLES=NO"
2504 "-DBUILD_SSL=NO"
2505 "-DBUILD_SHARED=NO")
2506 #:phases
2507 (modify-phases %standard-phases
2508 (add-after 'unpack 'apply-patches-and-fix-paths
2509 (lambda* (#:key inputs #:allow-other-keys)
2510 (let ((asio (assoc-ref inputs "asio"))
2511 (catch (assoc-ref inputs "catch"))
2512 (openssl (assoc-ref inputs "openssl")))
2513 (substitute* "cmake/Findasio.cmake"
2514 (("(find_path\\( asio_INCLUDE asio\\.hpp HINTS ).*$" all begin)
2515 (string-append begin " \"" asio "/include\" )")))
2516 (substitute* "cmake/Findcatch.cmake"
2517 (("(find_path\\( catch_INCLUDE catch\\.hpp HINTS ).*$" all begin)
2518 (string-append begin " \"" catch "/include\" )")))
2519 (substitute* "cmake/Findopenssl.cmake"
2520 (("(find_library\\( ssl_LIBRARY ssl ssleay32 HINTS ).*$" all begin)
2521 (string-append begin " \"" openssl "/lib\" )"))
2522 (("(find_library\\( crypto_LIBRARY crypto libeay32 HINTS ).*$" all begin)
2523 (string-append begin " \"" openssl "/lib\" )"))
2524 (("(find_path\\( ssl_INCLUDE openssl/ssl\\.h HINTS ).*$" all begin)
2525 (string-append begin " \"" openssl "/include\" )")))))))))
2526 (synopsis "Asynchronous RESTful functionality to C++11 applications")
2527 (description "Restbed is a comprehensive and consistent programming
2528 model for building applications that require seamless and secure
2529 communication over HTTP.")
2530 (home-page "https://github.com/Corvusoft/restbed")
2531 (license license:agpl3+))))
2532
2533 (define-public restinio
2534 (package
2535 (name "restinio")
2536 (version "0.6.0.1")
2537 (source (origin
2538 (method git-fetch)
2539 (uri (git-reference
2540 (url "https://github.com/Stiffstream/restinio.git")
2541 (commit (string-append "v." version))))
2542 (file-name (git-file-name name version))
2543 (sha256
2544 (base32
2545 "1c25kpx652nng8m1sqf5an2c3c4g3k6zj85mkkaxzk88iwfzq1s8"))))
2546 (build-system cmake-build-system)
2547 (inputs ; TODO: Need to force-keep references on some inputs, e.g. boost.
2548 `(("zlib" ,zlib)
2549 ("catch2" ,catch-framework2)
2550 ("openssl" ,openssl)
2551 ("boost" ,boost)
2552 ("pcre" ,pcre)
2553 ("pcre2" ,pcre2)
2554 ("sobjectizer" ,sobjectizer)))
2555 (propagated-inputs
2556 `(("asio", asio)
2557 ("fmt" ,fmt)
2558 ("http-parser", http-parser)))
2559 (arguments
2560 `(#:configure-flags '("-DRESTINIO_INSTALL=on")
2561 #:tests? #f ; TODO: The tests are called from the root CMakelist, need RESTINIO_TEST=on.
2562 #:phases
2563 (modify-phases %standard-phases
2564 (add-after 'unpack 'change-directory
2565 (lambda _
2566 (chdir "dev/restinio")
2567 #t)))))
2568 (home-page "https://stiffstream.com/en/products/restinio.html")
2569 (synopsis "C++14 library that gives you an embedded HTTP/Websocket server")
2570 (description "RESTinio is a header-only C++14 library that gives you an embedded
2571 HTTP/Websocket server. It is based on standalone version of ASIO
2572 and targeted primarily for asynchronous processing of HTTP-requests.")
2573 (license license:bsd-3)))
2574
2575 (define-public opendht
2576 (package
2577 (name "opendht")
2578 (version "2.0.0beta2")
2579 (source (origin
2580 (method git-fetch)
2581 (uri (git-reference
2582 (url "https://github.com/savoirfairelinux/opendht.git")
2583 (commit version)))
2584 (file-name (git-file-name name version))
2585 (sha256
2586 (base32
2587 "02ix0rvvyhq22gd5djcq84qz08ji7ln93faf23b27zjzni2klzv5"))))
2588 ;; Since 2.0, the gnu-build-system does not seem to work anymore, upstream bug?
2589 (build-system cmake-build-system)
2590 (inputs
2591 `(("gnutls" ,gnutls)
2592 ("nettle" ,nettle)
2593 ("readline" ,readline)
2594 ("jsoncpp" ,jsoncpp)
2595 ("openssl" ,openssl)
2596 ("fmt" ,fmt)))
2597 (propagated-inputs
2598 `(("argon2" ,argon2) ; TODO: Needed for the pkg-config .pc file to work?
2599 ("msgpack" ,msgpack))) ;included in several installed headers
2600 (native-inputs
2601 `(("autoconf" ,autoconf)
2602 ("pkg-config" ,pkg-config)
2603 ("restinio" ,restinio)
2604 ("automake" ,automake)
2605 ("libtool" ,libtool)
2606 ("cppunit" ,cppunit)))
2607 (arguments
2608 `(#:tests? #f ; Tests require network connection.
2609 #:configure-flags
2610 '(;; "-DOPENDHT_TESTS=on"
2611 "-DOPENDHT_TOOLS=off"
2612 "-DOPENDHT_PYTHON=off"
2613 "-DOPENDHT_PROXY_SERVER=on"
2614 "-DOPENDHT_PUSH_NOTIFICATIONS=on"
2615 "-DOPENDHT_PROXY_SERVER_IDENTITY=on"
2616 "-DOPENDHT_PROXY_CLIENT=on")))
2617 (home-page "https://github.com/savoirfairelinux/opendht/")
2618 (synopsis "Distributed Hash Table (DHT) library")
2619 (description "OpenDHT is a Distributed Hash Table (DHT) library. It may
2620 be used to manage peer-to-peer network connections as needed for real time
2621 communication.")
2622 (license license:gpl3+)))
2623
2624 (define-public frrouting
2625 (package
2626 (name "frrouting")
2627 (version "6.0.2")
2628 (source (origin
2629 (method url-fetch)
2630 (uri (string-append "https://github.com/FRRouting/frr/releases/"
2631 "download/frr-" version "/frr-" version
2632 ".tar.xz"))
2633 (sha256
2634 (base32
2635 "0xfrvi62w8qlh46f504ka0skb7pm0g0p8vmdng4w90gsbirlzpdd"))))
2636 (build-system gnu-build-system)
2637 (inputs
2638 `(("c-ares" ,c-ares)
2639 ("json-c" ,json-c)
2640 ("readline" ,readline)))
2641 (native-inputs
2642 `(("perl" ,perl)
2643 ("pkg-config" ,pkg-config)
2644 ("python" ,python-wrapper)
2645 ("python-pytest" ,python-pytest)))
2646 (home-page "https://frrouting.org/")
2647 (synopsis "IP routing protocol suite")
2648 (description "FRRouting (FRR) is an IP routing protocol suite which includes
2649 protocol daemons for BGP, IS-IS, LDP, OSPF, PIM, and RIP. ")
2650 (license license:gpl2+)))
2651
2652 (define-public iwd
2653 (package
2654 (name "iwd")
2655 (version "0.21")
2656 (source (origin
2657 (method git-fetch)
2658 (uri (git-reference
2659 (url "https://git.kernel.org/pub/scm/network/wireless/iwd.git")
2660 (commit version)))
2661 (file-name (git-file-name name version))
2662 (sha256
2663 (base32
2664 "001dikinsa6kshwscjbvwipavzwpqnpvx9fpshcn63gbvbhyd393"))))
2665 (build-system gnu-build-system)
2666 (inputs
2667 `(("dbus" ,dbus)
2668 ("libtool" ,libtool)
2669 ("ell" ,ell)
2670 ("readline" ,readline)))
2671 (native-inputs
2672 `(("asciidoc" ,asciidoc)
2673 ("autoconf" ,autoconf)
2674 ("automake" ,automake)
2675 ("pkgconfig" ,pkg-config)
2676 ("python" ,python)
2677 ("openssl" ,openssl)))
2678 (arguments
2679 `(#:configure-flags
2680 (let ((dbus (assoc-ref %outputs "out")))
2681 (list "--disable-systemd-service"
2682 "--enable-external-ell"
2683 "--enable-hwsim"
2684 "--enable-tools"
2685 "--enable-wired"
2686 "--enable-docs"
2687 "--localstatedir=/var"
2688 (string-append "--with-dbus-datadir=" dbus "/share/")
2689 (string-append "--with-dbus-busdir="
2690 dbus "/share/dbus-1/system-services")))
2691 #:phases
2692 (modify-phases %standard-phases
2693 (add-before 'bootstrap 'pre-bootstrap
2694 (lambda _
2695 (substitute* "Makefile.am"
2696 ;; Test disabled because it needs the kernel module
2697 ;; 'pkcs8_key_parser' loaded.
2698 (("unit\\/test-eapol.*? ") "")
2699 ;; Don't try to 'mkdir /var'.
2700 (("\\$\\(MKDIR_P\\) -m 700") "true"))
2701 #t)))))
2702 (home-page "https://git.kernel.org/pub/scm/network/wireless/iwd.git/")
2703 (synopsis "Internet Wireless Daemon")
2704 (description "iwd is a wireless daemon for Linux that aims to replace WPA
2705 Supplicant. It optimizes resource utilization by not depending on any external
2706 libraries and instead utilizing features provided by the Linux kernel to the
2707 maximum extent possible.")
2708 (license license:lgpl2.1+)))
2709
2710 (define-public batctl
2711 (package
2712 (name "batctl")
2713 (version "2019.5")
2714 (source
2715 (origin
2716 (method url-fetch)
2717 (uri (string-append "https://downloads.open-mesh.org/batman/releases/batman-adv-"
2718 version "/batctl-" version ".tar.gz"))
2719 (sha256
2720 (base32 "1b9w4636dq8m38nzr8j0v0j3b0vdsw84c58c2isc33h66dx8brgz"))))
2721 (inputs
2722 `(("libnl" ,libnl)))
2723 (native-inputs
2724 `(("pkg-config" ,pkg-config)))
2725 (build-system gnu-build-system)
2726 (arguments
2727 `(#:tests? #f
2728 ;; Batctl only has a makefile. Thus we disable tests and
2729 ;; configuration, passing in a few make-flags.
2730 #:phases (modify-phases %standard-phases (delete 'configure))
2731 #:make-flags
2732 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2733 (string-append "PKG_CONFIG=" (assoc-ref %build-inputs "pkg-config")
2734 "/bin/pkg-config")
2735 "CC=gcc")))
2736 (home-page "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki")
2737 (synopsis "Management tool for the mesh networking BATMAN protocol")
2738 (description "This package provides a control tool for the
2739 B.A.T.M.A.N. mesh networking routing protocol provided by the Linux kernel
2740 module @code{batman-adv}, for Layer 2.")
2741 (license license:gpl2+)))
2742
2743 (define-public pagekite
2744 (package
2745 (name "pagekite")
2746 (version "1.5.0.191126")
2747 (source
2748 (origin
2749 (method git-fetch)
2750 (uri (git-reference
2751 (url "https://github.com/pagekite/PyPagekite.git")
2752 (commit (string-append "v" version))))
2753 (file-name (git-file-name name version))
2754 (sha256
2755 (base32 "0mncfjfrr13sm84g5z49qxg5cy791h5qxphjsl77x91zs3m36c8l"))))
2756 (build-system python-build-system)
2757 (arguments
2758 `(#:phases
2759 (modify-phases %standard-phases
2760 (add-after 'install 'install-man-page
2761 (lambda* (#:key inputs outputs #:allow-other-keys)
2762 (let* ((out (assoc-ref outputs "out"))
2763 (man (string-append out "/share/man")))
2764 (invoke "make"
2765 (string-append "PYTHONPATH=" (getenv "PYTHONPATH"))
2766 "doc/pagekite.1")
2767 (install-file "doc/pagekite.1" (string-append man "/man1"))
2768 #t))))))
2769 (inputs
2770 `(("python-six" ,python-six)
2771 ("python-socksipychain" ,python-socksipychain)))
2772 (home-page "https://pagekite.net/")
2773 (synopsis "Make localhost servers publicly visible")
2774 (description
2775 "PageKite implements a tunneled reverse proxy which makes it easy to make
2776 a service (such as an HTTP or SSH server) on localhost visible to the wider
2777 Internet, even behind NAT or restrictive firewalls. A managed front-end relay
2778 service is available at @url{https://pagekite.net/}, or you can run your own.")
2779 (license license:agpl3+)))
2780
2781 (define-public ipcalc
2782 (package
2783 (name "ipcalc")
2784 (version "0.41")
2785 (source (origin
2786 (method url-fetch)
2787 (uri (string-append "http://jodies.de/ipcalc-archive/"
2788 name "-" version ".tar.gz"))
2789 (sha256
2790 (base32
2791 "12if9sm8h2ac0pgwkw835cgyqjxm6h27k4kfn2vfas9krrqwbafx"))))
2792 (inputs `(("perl" ,perl)
2793 ("tar" ,tar)
2794 ("gzip" ,gzip)
2795 ("tarball" ,source)))
2796 (build-system trivial-build-system) ;no Makefile.PL
2797 (arguments
2798 `(#:modules ((guix build utils))
2799 #:builder
2800 (begin
2801 (use-modules (guix build utils))
2802 (use-modules (srfi srfi-1))
2803 (let* ((source (assoc-ref %build-inputs "source"))
2804 (perl (string-append (assoc-ref %build-inputs "perl")
2805 "/bin"))
2806 (tar (assoc-ref %build-inputs "tar"))
2807 (gz (assoc-ref %build-inputs "gzip"))
2808 (out (assoc-ref %outputs "out"))
2809 (bin (string-append out "/bin"))
2810 (doc (string-append out "/share/doc/ipcalc")))
2811 (setenv "PATH" (string-append gz "/bin"))
2812 (invoke (string-append tar "/bin/tar") "xvf" source)
2813 (chdir (string-append ,name "-" ,version))
2814
2815 (install-file "ipcalc" bin)
2816 (patch-shebang (string-append bin "/ipcalc") (list perl))
2817 #t))))
2818 (synopsis "Simple IP network calculator")
2819 (description "ipcalc takes an IP address and netmask and calculates the
2820 resulting broadcast, network, Cisco wildcard mask, and host range. By giving
2821 a second netmask, you can design subnets and supernets. It is also intended
2822 to be a teaching tool and presents the subnetting results as
2823 easy-to-understand binary values.")
2824 (home-page "http://jodies.de/ipcalc")
2825 (license license:gpl2+)))
2826
2827 (define-public vde2
2828 (package
2829 (name "vde2")
2830 (version "2.3.2")
2831 (source
2832 (origin
2833 (method url-fetch)
2834 (uri "mirror://sourceforge/vde/vde2/2.3.2/vde2-2.3.2.tar.gz")
2835 (sha256
2836 (base32 "14xga0ib6p1wrv3hkl4sa89yzjxv7f1vfqaxsch87j6scdm59pr2"))))
2837 (build-system gnu-build-system)
2838 (arguments
2839 `(#:parallel-build? #f)) ; Build fails if #t.
2840 (inputs
2841 `(("python" ,python)
2842 ("libpcap" ,libpcap)
2843 ("openssl" ,openssl-1.0))) ; Build fails with 1.1.
2844 (home-page "https://github.com/virtualsquare/vde-2")
2845 (synopsis "Virtual Distributed Ethernet")
2846 (description "VDE is a set of programs to provide virtual software-defined
2847 Ethernet network interface controllers across multiple virtual or
2848 physical, local or remote devices. The VDE architecture provides
2849 virtual counterparts to hardware components such as switches and
2850 cables.")
2851 (license (list license:gpl2
2852 license:lgpl2.1 ; libvdeplug
2853 (license:non-copyleft ; slirpvde
2854 "file://COPYING.slirpvde"
2855 "See COPYING.slirpvde in the distribution.")))))