summaryrefslogtreecommitdiff
path: root/net-analyzer/netcat6
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/netcat6')
-rw-r--r--net-analyzer/netcat6/Manifest5
-rw-r--r--net-analyzer/netcat6/files/netcat6-1.0-automake-1.14.patch14
-rw-r--r--net-analyzer/netcat6/files/netcat6-1.0-unix-sockets.patch303
-rw-r--r--net-analyzer/netcat6/metadata.xml11
-rw-r--r--net-analyzer/netcat6/netcat6-1.0-r2.ebuild51
5 files changed, 0 insertions, 384 deletions
diff --git a/net-analyzer/netcat6/Manifest b/net-analyzer/netcat6/Manifest
deleted file mode 100644
index fcb5477da305..000000000000
--- a/net-analyzer/netcat6/Manifest
+++ /dev/null
@@ -1,5 +0,0 @@
-AUX netcat6-1.0-automake-1.14.patch 428 BLAKE2B 3ed473a4287f51ea22aa96a9155ae3bfb6883dc44258d569510667f0aaed0a632a7092205016a887bc53652e33d08a793c19d3cc85fcffad01853c39ab9e9e77 SHA512 91aa92162b379632318e429853382c0e73d8c37ac73fce91975dcc7340705435e5832c4fa7a185a1ad3f4c7b492a256fe08e8233da4bce963969325983f1e473
-AUX netcat6-1.0-unix-sockets.patch 8039 BLAKE2B 24ce41cc8d12280d4a06662fe3a2c2801f5a33087578eab27fed05bc8d4fc9a276057483de304ef78f28f2c89a48673ce670d9b819b86a2d763515d79cb41725 SHA512 2fbbbb4bdabada521d9fb33ad545459a03a8b443387a490a07a8bcd403817650a2f2cfd73c8a4e8e8fd02d1f5c0bd8a045ecd31ec5ffbdf5d22e0c1b758b12bc
-DIST nc6-1.0.tar.bz2 264257 BLAKE2B 2e9ebdfb45246b8cbfd8515e51ab3262593425f98d1eec623dd21932d48a6bd200d537d3e326e3122835a3a18584c19d1dcc43118ba34d9a21cb8505c8510d3c SHA512 199f3bd18bb452544da8ca1b0f5347f79662bea81e9af335a41ed62c12d5d8cb41d99442ca54f301538d27aec4ada5f59db87461e5b0f20333ba1b52859bd35a
-EBUILD netcat6-1.0-r2.ebuild 1110 BLAKE2B 1dfe776097733194c955f5772ff94e88e84b11e25297086dfc53b45773e9a00ca8b627094fc69b155a9185898b7f0ab6f77f74116ec69771a096c5655068c467 SHA512 98fe194d36cbec39d10572ca4e597b4d8ed47237583c294e02797c30793544a94e69ad6541bc555f0be514c21afcd0c4e9870ab8a534e86ca9d153cd7f91bc38
-MISC metadata.xml 357 BLAKE2B 775c1871988fa11fb08eb8d923a2f7119a9cdc4e6d1325b0bba5408e7ea51268687661d46fe3a4a45aa265bf30783edb42cc1b0ae2e1bbf15738e0907a8df3e6 SHA512 a5b578146dd743e567e6edceda335342e825a502c0ccabd25597c8c0bc0f8cea6ed662547af284ac6e28da05822f95ac4087411d93d503822379cac49118a6bb
diff --git a/net-analyzer/netcat6/files/netcat6-1.0-automake-1.14.patch b/net-analyzer/netcat6/files/netcat6-1.0-automake-1.14.patch
deleted file mode 100644
index f7c128590be8..000000000000
--- a/net-analyzer/netcat6/files/netcat6-1.0-automake-1.14.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -2,9 +2,9 @@
- AC_INIT(nc6, 1.0, [ds6-devel@deepspace6.net])
- AC_CONFIG_AUX_DIR(config)
- AC_CONFIG_SRCDIR(src/main.c)
--AM_GNU_GETTEXT_VERSION(0.14.1)
- AM_INIT_AUTOMAKE(1.6) dnl Automake 1.6 or better is required
--AM_CONFIG_HEADER(config.h)
-+AM_GNU_GETTEXT_VERSION(0.14.1)
-+AC_CONFIG_HEADERS(config.h)
- AC_PREREQ(2.52) dnl Autoconf 2.52 or better is required
-
-
diff --git a/net-analyzer/netcat6/files/netcat6-1.0-unix-sockets.patch b/net-analyzer/netcat6/files/netcat6-1.0-unix-sockets.patch
deleted file mode 100644
index 5ab0ece124f1..000000000000
--- a/net-analyzer/netcat6/files/netcat6-1.0-unix-sockets.patch
+++ /dev/null
@@ -1,303 +0,0 @@
---- a/docs/nc6.1.in
-+++ b/docs/nc6.1.in
-@@ -160,6 +160,10 @@
- With this option set, netcat6 will use UDP as the transport protocol (TCP is
- the default).
- .TP 13
-+.I \-U, --unix
-+With this option set, netcat6 will connect to a unix domain socket.
-+The listen mode has not been implemented yet.
-+.TP 13
- .I \-v
- Enable verbose mode. This gives some basic information about what netcat6
- is doing. Use it twice for extra verbosity.
-
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -6,6 +6,7 @@
- network.h \
- afindep.h \
- bluez.h \
-+ unixsocket.h \
- netsupport.h \
- parser.h \
- readwrite.h \
-@@ -20,6 +21,7 @@
- afindep.c \
- netsupport.c \
- parser.c \
-+ unixsocket.c \
- readwrite.c \
- io_stream.c \
- connection.c
-
---- a/src/connection.c
-+++ b/src/connection.c
-@@ -109,6 +109,9 @@
- fatal_internal("unavailable bluez support required");
- #endif
- break;
-+ case PROTO_UNIX:
-+ ainfo->ai_family = PF_UNIX;
-+ break;
- default:
- fatal_internal("unknown socket domain");
- }
-@@ -144,6 +147,10 @@
- fatal_internal("unavailable bluez support required");
- #endif
- break;
-+ case UNIX_PROTOCOL:
-+ ainfo->ai_protocol = 0;
-+ ainfo->ai_socktype = SOCK_STREAM;
-+ break;
- default:
- fatal_internal("unknown socket type");
- }
-
---- a/src/connection.h
-+++ b/src/connection.h 2008-10-25 14:17:09 +0000
-@@ -31,12 +31,14 @@
- PROTO_UNSPECIFIED,
- PROTO_IPv6,
- PROTO_IPv4,
-+ PROTO_UNIX,
- PROTO_BLUEZ
- } sock_family_t;
-
- typedef enum sock_protocol {
- TCP_PROTOCOL,
- UDP_PROTOCOL,
-+ UNIX_PROTOCOL,
- SCO_PROTOCOL,
- L2CAP_PROTOCOL
- } sock_protocol_t;
-
---- a/src/network.c
-+++ b/src/network.c
-@@ -23,6 +23,7 @@
- #include "network.h"
- #include "connection.h"
- #include "afindep.h"
-+#include "unixsocket.h"
- #ifdef ENABLE_BLUEZ
- #include "bluez.h"
- #endif/*ENABLE_BLUEZ*/
-@@ -113,6 +114,11 @@
-
- /* invoke the appropriate connector for the protocol family */
- switch (ca_family(attrs)) {
-+ case PROTO_UNIX:
-+ fd = unixsocket_connect(&hints,
-+ remote->address,
-+ timeout, &socktype);
-+ break;
- #ifdef ENABLE_BLUEZ
- case PROTO_BLUEZ:
- fd = bluez_connect(&hints,
-
---- a/src/parser.c
-+++ b/src/parser.c
-@@ -109,7 +109,9 @@
- {"bluetooth", no_argument, NULL, 'b'},
- #define OPT_SCO 24
- {"sco", no_argument, NULL, 0 },
--#define OPT_MAX 25
-+#define OPT_UNIX_SOCKET 25
-+ {"unix", no_argument, NULL, 'U'},
-+#define OPT_MAX 26
- {0, 0, 0, 0}
- };
-
-@@ -160,7 +162,7 @@
- _verbosity_level = 0;
-
- /* option recognition loop */
-- while ((c = getopt_long(argc, argv, "46be:hlnp:q:s:uvw:xX",
-+ while ((c = getopt_long(argc, argv, "46be:hlnp:q:s:uUvw:xX",
- long_options, &option_index)) >= 0)
- {
- switch (c) {
-@@ -231,6 +233,9 @@
- family = PROTO_IPv6;
- ca_set_flag(attrs, CA_STRICT_IPV6);
- break;
-+ case 'U':
-+ family = PROTO_UNIX;
-+ break;
- case 'b':
- family = PROTO_BLUEZ;
- break;
-@@ -330,6 +335,9 @@
- /* set default protocols */
- if (protocol == PROTO_UNSPECIFIED) {
- switch (family) {
-+ case PROTO_UNIX:
-+ protocol = UNIX_PROTOCOL;
-+ break;
- case PROTO_BLUEZ:
- protocol = L2CAP_PROTOCOL;
- break;
-@@ -344,6 +352,11 @@
- fatal(_("cannot specify UDP protocol and bluetooth"));
- if (protocol == SCO_PROTOCOL && family != PROTO_BLUEZ)
- fatal(_("--sco requires --bluetooth (-b)"));
-+ if (protocol == UNIX_PROTOCOL && family != PROTO_UNIX)
-+ fatal(_("--unix does not need protocol specifications"));
-+
-+ if (family == PROTO_UNIX && listen_mode)
-+ fatal(_("--unix cannot --listen yet"));
-
- /* check compiled options */
- #ifndef ENABLE_BLUEZ
-@@ -380,6 +393,10 @@
- fatal_internal("unknown/unsupported bluetooth "
- "protocol %d", protocol);
- break;
-+ case PROTO_UNIX:
-+ if (protocol != UNIX_PROTOCOL)
-+ fatal_internal("unknown/unsupported UNIX protocol %d", protocol);
-+ break;
- default:
- fatal_internal("invalid protocol family %d", family);
- }
-@@ -425,18 +442,18 @@
- fatal(_("cannot set both --recv-only and --send-only"));
- }
-
-- /* check ports have not been specified with --sco */
-- if (protocol == SCO_PROTOCOL) {
-+ /* check ports have not been specified with --sco and --unix */
-+ if (protocol == SCO_PROTOCOL || protocol == UNIX_PROTOCOL) {
- if (remote_address.service != NULL)
-- fatal(_("--sco does not support remote port"));
-+ fatal(_("--sco and --unix do not support remote port"));
- if (local_address.service != NULL)
-- fatal(_("--sco does not support local port (-p)"));
-+ fatal(_("--sco and --unix do not support local port (-p)"));
- }
-
- /* check mode specific option availability and interactions */
- if (listen_mode == true) {
- /* check port has been specified (except with sco) */
-- if (local_address.service == NULL && protocol != SCO_PROTOCOL) {
-+ if (local_address.service == NULL && protocol != SCO_PROTOCOL && protocol != UNIX_PROTOCOL) {
- fatal(_("in listen mode you must specify a port "
- "with the -p switch"));
- }
-@@ -450,6 +467,7 @@
- /* check port has been specified (except with sco) */
- if (remote_address.address == NULL ||
- (remote_address.service == NULL &&
-+ protocol != UNIX_PROTOCOL &&
- protocol != SCO_PROTOCOL))
- {
- fatal(_("you must specify the address/port couple "
-@@ -553,6 +571,8 @@
- fprintf(fp, " -6 %s\n", _("Use only IPv6"));
- fprintf(fp, " -b, --bluetooth %s\n",
- _("Use Bluetooth (defaults to L2CAP protocol)"));
-+ fprintf(fp, " -U, --unix %s\n",
-+ _("Connect to unix domain sockets"));
- fprintf(fp, " --buffer-size=BYTES %s\n", _("Set buffer size"));
- fprintf(fp, " --continuous %s\n",
- _("Continuously accept connections\n"
-
---- a/src/unixsocket.c
-+++ b/src/unixsocket.c
-@@ -0,0 +1,78 @@
-+/*
-+ * unixsocket.c - address family independant networking functions
-+ */
-+#include "system.h"
-+#include "unixsocket.h"
-+#include "misc.h"
-+#include "netsupport.h"
-+#include "parser.h"
-+
-+#include <assert.h>
-+#include <errno.h>
-+#include <string.h>
-+#include <stdlib.h>
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#include <sys/un.h>
-+#include <unistd.h>
-+#include <limits.h>
-+
-+RCSID("@(#) $Id$");
-+
-+
-+int unixsocket_connect(const struct addrinfo *hints,
-+ const char *remote_address,
-+ time_t timeout, int *rt_socktype)
-+{
-+ int err, fd = -1;
-+ struct sockaddr_un sa;
-+ const struct addrinfo *ptr = hints;
-+
-+ /* make sure arguments are valid and preconditions are respected */
-+ assert(hints != NULL);
-+ assert(remote_address != NULL && strlen(remote_address) > 0);
-+ assert(sizeof(sa.sun_path) >= strlen(remote_address));
-+
-+ sa.sun_family = ptr->ai_family;
-+ strncpy(sa.sun_path, remote_address, sizeof(sa.sun_path));
-+
-+
-+ /* create the socket */
-+ fd = socket(ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol);
-+ if (fd < 0) {
-+ warning("cannot create the socket: %s", strerror(errno));
-+ return -1;
-+ }
-+
-+ /* attempt the connection */
-+ err = connect_with_timeout(fd, (struct sockaddr *)&sa, sizeof(sa), timeout);
-+
-+ if (err != 0)
-+ {
-+ /* check error code */
-+ if (verbose_mode()) {
-+ /* use different error message for timeout */
-+ if (errno == ETIMEDOUT) {
-+ /* connection timed out */
-+ warning(_("timeout while connecting to %s"), remote_address);
-+ }
-+ else {
-+ /* connection failed */
-+ warning(_("cannot connect to %s: %s"), remote_address, strerror(errno));
-+ }
-+ }
-+ close(fd);
-+ return -1;
-+ }
-+
-+ assert(ptr == NULL || fd >= 0);
-+
-+ /* let the user know the connection has been established */
-+ if (verbose_mode()) warning(_("%s open"), remote_address);
-+
-+ /* return the socktype */
-+ if (rt_socktype != NULL) *rt_socktype = ptr->ai_socktype;
-+
-+ return fd;
-+}
-+
-
---- a/src/unixsocket.h
-+++ b/src/unixsocket.h
-@@ -0,0 +1,12 @@
-+#ifndef UNIXSOCKET_H
-+#define UNIXSOCKET_H
-+
-+#include <netdb.h>
-+#include <sys/types.h>
-+
-+/* establish a connection and return a new fd and socktype */
-+int unixsocket_connect(const struct addrinfo *hints,
-+ const char *remote_address,
-+ time_t timeout, int *socktype);
-+
-+#endif
-
diff --git a/net-analyzer/netcat6/metadata.xml b/net-analyzer/netcat6/metadata.xml
deleted file mode 100644
index 3baf3341ea46..000000000000
--- a/net-analyzer/netcat6/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>netmon@gentoo.org</email>
- <name>Gentoo network monitoring and analysis project</name>
- </maintainer>
- <upstream>
- <remote-id type="sourceforge">netcat6</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/net-analyzer/netcat6/netcat6-1.0-r2.ebuild b/net-analyzer/netcat6/netcat6-1.0-r2.ebuild
deleted file mode 100644
index 1942014970e2..000000000000
--- a/net-analyzer/netcat6/netcat6-1.0-r2.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit eutils autotools toolchain-funcs
-
-DESCRIPTION="Obsolete netcat clone from before netcat had IPv6 support"
-HOMEPAGE="http://netcat6.sourceforge.net/"
-SRC_URI="ftp://ftp.deepspace6.net/pub/ds6/sources/nc6/nc6-${PV}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 m68k ~mips ppc ~ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
-IUSE="ipv6 nls bluetooth"
-
-# need to block netcat as we provide the "nc" file now too
-DEPEND="
- bluetooth? ( net-wireless/bluez )
-"
-RDEPEND="
- ${DEPEND}
- !net-analyzer/netcat
-"
-
-S=${WORKDIR}/nc6-${PV}
-
-DOCS=( AUTHORS BUGS README NEWS TODO CREDITS ChangeLog )
-
-src_prepare() {
- epatch \
- "${FILESDIR}"/${P}-unix-sockets.patch \
- "${FILESDIR}"/${P}-automake-1.14.patch
- AM_OPTS="--force-missing" eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable ipv6) \
- $(use_enable bluetooth bluez) \
- $(use_enable nls)
-}
-
-src_compile() {
- emake AR=$(tc-getAR)
-}
-
-src_install() {
- default
- dodir /usr/bin
- dosym /usr/bin/nc6 /usr/bin/nc
-}