gnu: Add perl-net-dns.
[jackhill/guix/guix.git] / gnu / packages / networking.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Stefan Reichör <stefan@xsteve.at>
6 ;;; Copyright © 2016 Raimon Grau <raimonster@gmail.com>
7 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
9 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages networking)
27 #:use-module (guix build-system perl)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix build-system glib-or-gtk)
32 #:use-module (guix build-system gnu)
33 #:use-module (gnu packages admin)
34 #:use-module (gnu packages adns)
35 #:use-module (gnu packages algebra)
36 #:use-module (gnu packages audio)
37 #:use-module (gnu packages bison)
38 #:use-module (gnu packages check)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages flex)
41 #:use-module (gnu packages gettext)
42 #:use-module (gnu packages gnupg)
43 #:use-module (gnu packages gtk)
44 #:use-module (gnu packages linux)
45 #:use-module (gnu packages lua)
46 #:use-module (gnu packages mit-krb5)
47 #:use-module (gnu packages ncurses)
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages python)
51 #:use-module (gnu packages tls))
52
53 (define-public macchanger
54 (package
55 (name "macchanger")
56 (version "1.6.0")
57 (source (origin
58 (method url-fetch)
59 (uri (string-append "mirror://gnu/"
60 name "/" name "-" version ".tar.gz"))
61 (sha256
62 (base32
63 "1xsiivjjyhqcs6dyjcshrnxlgypvyfzacjz7gcjgl88xiw9lylri"))))
64 (build-system gnu-build-system)
65 (home-page "http://www.gnu.org/software/macchanger")
66 (synopsis "Viewing and manipulating MAC addresses of network interfaces")
67 (description "GNU MAC Changer is a utility for viewing and changing MAC
68 addresses of networking devices. New addresses may be set explicitly or
69 randomly. They can include MAC addresses of the same or other hardware vendors
70 or, more generally, MAC addresses of the same category of hardware.")
71 (license license:gpl2+)))
72
73 (define-public miredo
74 (package
75 (name "miredo")
76 (version "1.2.6")
77 (source (origin
78 (method url-fetch)
79 (uri (string-append "http://www.remlab.net/files/miredo/miredo-"
80 version ".tar.xz"))
81 (sha256
82 (base32
83 "0j9ilig570snbmj48230hf7ms8kvcwi2wblycqrmhh85lksd49ps"))))
84 (build-system gnu-build-system)
85 (arguments
86 '(#:phases
87 (modify-phases %standard-phases
88 ;; The checkconf test in src/ requires network access.
89 (add-before
90 'check 'disable-checkconf-test
91 (lambda _
92 (substitute* "src/Makefile"
93 (("^TESTS = .*") "TESTS = \n")))))))
94 (home-page "http://www.remlab.net/miredo/")
95 (synopsis "Teredo IPv6 tunneling software")
96 (description
97 "Miredo is an implementation (client, relay, server) of the Teredo
98 specification, which provides IPv6 Internet connectivity to IPv6 enabled hosts
99 residing in IPv4-only networks, even when they are behind a NAT device.")
100 (license license:gpl2+)))
101
102 (define-public socat
103 (package
104 (name "socat")
105 (version "1.7.3.1")
106 (source (origin
107 (method url-fetch)
108 (uri (string-append
109 "http://www.dest-unreach.org/socat/download/socat-"
110 version ".tar.bz2"))
111 (sha256
112 (base32
113 "1apvi7sahcl44arnq1ad2y6lbfqnmvx7nhz9i3rkk0f382anbnnj"))))
114 (build-system gnu-build-system)
115 (arguments '(#:tests? #f)) ;no 'check' phase
116 (inputs `(("openssl" ,openssl)))
117 (home-page "http://www.dest-unreach.org/socat/")
118 (synopsis
119 "Open bidirectional communication channels from the command line")
120 (description
121 "socat is a relay for bidirectional data transfer between two independent
122 data channels---files, pipes, devices, sockets, etc. It can create
123 \"listening\" sockets, named pipes, and pseudo terminals.
124
125 socat can be used, for instance, as TCP port forwarder, as a shell interface
126 to UNIX sockets, IPv6 relay, for redirecting TCP oriented programs to a serial
127 line, to logically connect serial lines on different computers, or to
128 establish a relatively secure environment (su and chroot) for running client
129 or server shell scripts with network connections.")
130 (license license:gpl2)))
131
132 (define-public zeromq
133 (package
134 (name "zeromq")
135 (version "4.0.7")
136 (source (origin
137 (method url-fetch)
138 (uri (string-append "http://download.zeromq.org/zeromq-"
139 version ".tar.gz"))
140 (sha256
141 (base32
142 "00vvwhgcdr1lva2pavicvy92iad0hj8cf71n702hv6blw1kjj2z0"))))
143 (build-system gnu-build-system)
144 (home-page "http://zeromq.org")
145 (synopsis "Library for message-based applications")
146 (description
147 "The 0MQ lightweight messaging kernel is a library which extends the
148 standard socket interfaces with features traditionally provided by specialized
149 messaging middle-ware products. 0MQ sockets provide an abstraction of
150 asynchronous message queues, multiple messaging patterns, message
151 filtering (subscriptions), seamless access to multiple transport protocols and
152 more.")
153 (license license:lgpl3+)))
154
155 (define-public librdkafka
156 (package
157 (name "librdkafka")
158 (version "0.9.1")
159 (source (origin
160 (method url-fetch)
161 (uri (string-append
162 "https://github.com/edenhill/librdkafka/archive/"
163 version ".tar.gz"))
164 (file-name (string-append name "-" version ".tar.gz"))
165 (sha256
166 (base32
167 "10ldx7g7ymmg17snzx78vy4n8ma1rjx0agzi34g15j2fk867xmas"))))
168 (build-system gnu-build-system)
169 (arguments
170 '(#:phases
171 (modify-phases %standard-phases
172 (replace 'configure
173 ;; its custom configure script doesn't understand 'CONFIG_SHELL'.
174 (lambda* (#:key outputs #:allow-other-keys)
175 (let ((out (assoc-ref outputs "out")))
176 ;; librdkafka++.so lacks RUNPATH for librdkafka.so
177 (setenv "LDFLAGS"
178 (string-append "-Wl,-rpath=" out "/lib"))
179 (zero? (system* "./configure"
180 (string-append "--prefix=" out)))))))))
181 (native-inputs
182 `(("python" ,python-wrapper)))
183 (propagated-inputs
184 `(("zlib" ,zlib))) ; in the Libs.private field of rdkafka.pc
185 (home-page "https://github.com/edenhill/librdkafka")
186 (synopsis "Apache Kafka C/C++ client library")
187 (description
188 "librdkafka is a C library implementation of the Apache Kafka protocol,
189 containing both Producer and Consumer support.")
190 (license license:bsd-2)))
191
192 (define-public libndp
193 (package
194 (name "libndp")
195 (version "1.6")
196 (source (origin
197 (method url-fetch)
198 (uri (string-append "http://libndp.org/files/"
199 name "-" version ".tar.gz"))
200 (sha256
201 (base32
202 "03mczwrxqbp54msafxzzyhaazkvjdwm2kipjkrb5xg8kw22glz8c"))))
203 (build-system gnu-build-system)
204 (home-page "http://libndp.org/")
205 (synopsis "Library for Neighbor Discovery Protocol")
206 (description
207 "libndp contains a library which provides a wrapper for IPv6 Neighbor
208 Discovery Protocol. It also provides a tool named ndptool for sending and
209 receiving NDP messages.")
210 (license license:lgpl2.1+)))
211
212 (define-public ethtool
213 (package
214 (name "ethtool")
215 (version "4.0")
216 (source (origin
217 (method url-fetch)
218 (uri (string-append "mirror://kernel.org/software/network/"
219 name "/" name "-" version ".tar.xz"))
220 (sha256
221 (base32
222 "1zzcwn6pk8qfasalqkxg8vrhacksfa50xsq4xifw7yfjqyn8fj4h"))))
223 (build-system gnu-build-system)
224 (home-page "https://www.kernel.org/pub/software/network/ethtool/")
225 (synopsis "Display or change Ethernet device settings")
226 (description
227 "ethtool can be used to query and change settings such as speed,
228 auto-negotiation and checksum offload on many network devices, especially
229 Ethernet devices.")
230 (license license:gpl2)))
231
232 (define-public ifstatus
233 (package
234 (name "ifstatus")
235 (version "1.1.0")
236 (source (origin
237 (method url-fetch)
238 (uri (string-append "mirror://sourceforge/ifstatus/ifstatus/"
239 "ifstatus%20v" version "/ifstatus-v"
240 version ".tar.gz"))
241 (sha256
242 (base32
243 "045cbsq9ps32j24v8y5hpyqxnqn9mpaf3mgvirlhgpqyb9jsia0c"))
244 (modules '((guix build utils)))
245 (snippet
246 '(substitute* "Main.h"
247 (("#include <stdio.h>")
248 "#include <stdio.h>\n#include <stdlib.h>")))))
249 (build-system gnu-build-system)
250 (arguments
251 '(#:tests? #f ; no "check" target
252 #:phases
253 (modify-phases %standard-phases
254 (delete 'configure) ; no configure script
255 (replace 'install
256 (lambda* (#:key outputs #:allow-other-keys)
257 (let* ((out (assoc-ref outputs "out"))
258 (bin (string-append out "/bin")))
259 (mkdir-p bin)
260 (copy-file "ifstatus"
261 (string-append bin "/ifstatus"))))))))
262 (inputs `(("ncurses" ,ncurses)))
263 (home-page "http://ifstatus.sourceforge.net/graphic/index.html")
264 (synopsis "Text based network interface status monitor")
265 (description
266 "IFStatus is a simple, easy-to-use program for displaying commonly
267 needed/wanted real-time traffic statistics of multiple network
268 interfaces, with a simple and efficient view on the command line. It is
269 intended as a substitute for the PPPStatus and EthStatus projects.")
270 (license license:gpl2+)))
271
272 (define-public nload
273 (package
274 (name "nload")
275 (version "0.7.4")
276 (source (origin
277 (method url-fetch)
278 (uri (string-append "mirror://sourceforge/nload/nload/" version
279 "/nload-" version ".tar.gz"))
280 (sha256
281 (base32
282 "1rb9skch2kgqzigf19x8bzk211jdfjfdkrcvaqyj89jy2pkm3h61"))))
283 (build-system gnu-build-system)
284 (inputs `(("ncurses" ,ncurses)))
285 (home-page "http://www.roland-riegel.de/nload/")
286 (synopsis "Realtime console network usage monitor")
287 (description
288 "Nload is a console application which monitors network traffic and
289 bandwidth usage in real time. It visualizes the in- and outgoing traffic using
290 two graphs and provides additional info like total amount of transfered data
291 and min/max network usage.")
292 (license license:gpl2+)))
293
294 (define-public iodine
295 (package
296 (name "iodine")
297 (version "0.7.0")
298 (source (origin
299 (method url-fetch)
300 (uri (string-append "http://code.kryo.se/" name "/"
301 name "-" version ".tar.gz"))
302 (sha256
303 (base32
304 "0gh17kcxxi37k65zm4gqsvbk3aw7yphcs3c02pn1c4s2y6n40axd"))))
305 (build-system gnu-build-system)
306 (arguments
307 '(#:phases
308 (modify-phases %standard-phases
309 (delete 'configure)
310 (add-before 'check 'delete-failing-tests
311 ;; Avoid https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802105
312 (lambda _
313 (substitute* "tests/common.c"
314 (("tcase_add_test\\(tc, \
315 test_parse_format_ipv(4(|_listen_all|_mapped_ipv6)|6)\\);")
316 "")))))
317 #:make-flags (list "CC=gcc"
318 (string-append "prefix=" (assoc-ref %outputs "out")))
319 #:test-target "test"))
320 (inputs `(("zlib" ,zlib)))
321 (native-inputs `(("check" ,check)
322 ("pkg-config" ,pkg-config)))
323 (home-page "http://code.kryo.se/iodine/")
324 (synopsis "Tunnel IPv4 data through a DNS server")
325 (description "Iodine tunnels IPv4 data through a DNS server. This
326 can be useful in different situations where internet access is firewalled, but
327 DNS queries are allowed. The bandwidth is asymmetrical, with limited upstream
328 and up to 1 Mbit/s downstream.")
329 ;; src/md5.[ch] is released under the zlib license
330 (license (list license:isc license:zlib))))
331
332 (define-public wireshark
333 (package
334 (name "wireshark")
335 (version "2.0.5")
336 (synopsis "Network traffic analyzer")
337 (source
338 (origin
339 (method url-fetch)
340 (uri (string-append "https://www.wireshark.org/download/src/wireshark-"
341 version ".tar.bz2"))
342 (sha256
343 (base32
344 "02xi3fz8blcz9cf75rs11g7bijk06wm45vpgnksp72c2609j9q0c"))))
345 (build-system glib-or-gtk-build-system)
346 (inputs `(("bison" ,bison)
347 ("c-ares" ,c-ares)
348 ("flex" ,flex)
349 ("gnutls" ,gnutls)
350 ("gtk+" ,gtk+)
351 ("libcap" ,libcap)
352 ("libgcrypt" ,libgcrypt)
353 ("libnl" ,libnl)
354 ("libpcap" ,libpcap)
355 ("lua" ,lua)
356 ("krb5" ,mit-krb5)
357 ("openssl" ,openssl)
358 ("portaudio" ,portaudio)
359 ("sbc" ,sbc)
360 ("zlib" ,zlib)))
361 (native-inputs `(("perl" ,perl)
362 ("pkg-config" ,pkg-config)
363 ("python" ,python-wrapper)))
364 (arguments
365 `(#:configure-flags
366 (list (string-append "--with-c-ares=" (assoc-ref %build-inputs "c-ares"))
367 (string-append "--with-krb5=" (assoc-ref %build-inputs "krb5"))
368 (string-append "--with-libcap=" (assoc-ref %build-inputs "libcap"))
369 (string-append "--with-lua=" (assoc-ref %build-inputs "lua"))
370 (string-append "--with-pcap=" (assoc-ref %build-inputs "libpcap"))
371 (string-append "--with-portaudio="
372 (assoc-ref %build-inputs "portaudio"))
373 (string-append "--with-sbc=" (assoc-ref %build-inputs "sbc"))
374 (string-append "--with-ssl=" (assoc-ref %build-inputs "openssl"))
375 (string-append "--with-zlib=" (assoc-ref %build-inputs "zlib"))
376 "--without-qt")))
377 (description "Wireshark is a network protocol analyzer, or @dfn{packet
378 sniffer}, that lets you capture and interactively browse the contents of
379 network frames.")
380 (license license:gpl2+)
381 (home-page "https://www.wireshark.org/")))
382
383 (define-public httping
384 (package
385 (name "httping")
386 (version "2.4")
387 (source
388 (origin
389 (method url-fetch)
390 (uri (string-append "https://www.vanheusden.com/httping/httping-"
391 version ".tgz"))
392 (sha256
393 (base32
394 "1110r3gpsj9xmybdw7w4zkhj3zmn5mnv2nq0ijbvrywbn019zdfs"))))
395 (build-system gnu-build-system)
396 (native-inputs
397 `(("gettext" ,gnu-gettext)))
398 (inputs
399 `(("fftw" ,fftw)
400 ("ncurses" ,ncurses)
401 ("openssl" ,openssl)))
402 (arguments
403 `(#:make-flags (list "CC=gcc"
404 (string-append "DESTDIR=" (assoc-ref %outputs "out"))
405 "PREFIX=")
406 #:tests? #f)) ; no tests
407 (home-page "https://www.vanheusden.com/httping/")
408 (synopsis "Web server latency and throughput monitor")
409 (description
410 "httping measures how long it takes to connect to a web server, send an
411 HTTP(S) request, and receive the reply headers. It is somewhat similar to
412 @command{ping}, but can be used even in cases where ICMP traffic is blocked
413 by firewalls or when you want to monitor the response time of the actual web
414 application stack itself.")
415 (license license:gpl2))) ; with permission to link with OpenSSL
416
417 (define-public perl-net-dns
418 (package
419 (name "perl-net-dns")
420 (version "1.06")
421 (source
422 (origin
423 (method url-fetch)
424 (uri (string-append
425 "mirror://cpan/authors/id/N/NL/NLNETLABS/Net-DNS-"
426 version
427 ".tar.gz"))
428 (sha256
429 (base32
430 "07m5331132h9xkh1i6jv9d80f571yva27iqa31aq4sm31iw7nn53"))))
431 (build-system perl-build-system)
432 (inputs
433 `(("perl-digest-hmac" ,perl-digest-hmac)))
434 (home-page "http://search.cpan.org/dist/Net-DNS")
435 (synopsis
436 "Perl Interface to the Domain Name System")
437 (description "Net::DNS is the Perl Interface to the Domain Name System.")
438 (license license:x11)))