summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgatekeeper <tiago.gasiba@gmail.com>2024-04-01 10:47:09 -0300
committerGabriel M. Dutra <dutra@FreeBSD.org>2024-04-01 17:44:26 -0300
commit257ead13363add38a91c7768c3b38fcd7dd5983c (patch)
treecfacc6112e297a01655146cf2b8dcf4a23722194
parenteditors/editorconfig-core-c: Update to 0.12.7 (diff)
net/netdiscover: Add new port
Netdiscover is an arp packet-based network address discovery tool PR: 277932 Approved by: garga (mentor) Differential Revision: https://reviews.freebsd.org/D44551
-rw-r--r--net/Makefile1
-rw-r--r--net/netdiscover/Makefile25
-rw-r--r--net/netdiscover/distinfo3
-rw-r--r--net/netdiscover/files/patch-src_data__al.h10
-rw-r--r--net/netdiscover/files/patch-src_misc.c10
-rw-r--r--net/netdiscover/pkg-descr3
6 files changed, 52 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index 62ea4dca446a..689285bf1f69 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -514,6 +514,7 @@
SUBDIR += net6
SUBDIR += netatalk3
SUBDIR += netcat
+ SUBDIR += netdiscover
SUBDIR += netembryo
SUBDIR += nethogs
SUBDIR += netmap
diff --git a/net/netdiscover/Makefile b/net/netdiscover/Makefile
new file mode 100644
index 000000000000..38fe0d38aa91
--- /dev/null
+++ b/net/netdiscover/Makefile
@@ -0,0 +1,25 @@
+PORTNAME= netdiscover
+DISTVERSION= 0.10
+CATEGORIES= net
+
+MAINTAINER= tiago.gasiba@gmail.com
+COMMENT= Network address discovering tool
+WWW= https://github.com/netdiscover-scanner/netdiscover
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+USES= autoreconf
+
+USE_GITHUB= yes
+GH_ACCOUNT= netdiscover-scanner
+GNU_CONFIGURE= yes
+GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share
+
+PLIST_FILES= sbin/netdiscover \
+ share/man/man8/netdiscover.8.gz
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/netdiscover
+
+.include <bsd.port.mk>
diff --git a/net/netdiscover/distinfo b/net/netdiscover/distinfo
new file mode 100644
index 000000000000..c2c5739f4a64
--- /dev/null
+++ b/net/netdiscover/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1711306722
+SHA256 (netdiscover-scanner-netdiscover-0.10_GH0.tar.gz) = dc331da2052ef1b0e8de50b8550c63f1e10720101df8f075efe6adeb2dad4afd
+SIZE (netdiscover-scanner-netdiscover-0.10_GH0.tar.gz) = 403310
diff --git a/net/netdiscover/files/patch-src_data__al.h b/net/netdiscover/files/patch-src_data__al.h
new file mode 100644
index 000000000000..86748990513b
--- /dev/null
+++ b/net/netdiscover/files/patch-src_data__al.h
@@ -0,0 +1,10 @@
+--- src/data_al.h.orig 2024-03-24 19:35:17 UTC
++++ src/data_al.h
+@@ -30,6 +30,7 @@
+
+ #include <pthread.h>
+ #include "screen.h"
++#include <pcap/pcap.h>
+
+ #ifdef __cplusplus
+ extern "C"
diff --git a/net/netdiscover/files/patch-src_misc.c b/net/netdiscover/files/patch-src_misc.c
new file mode 100644
index 000000000000..f37f6d51c2a4
--- /dev/null
+++ b/net/netdiscover/files/patch-src_misc.c
@@ -0,0 +1,10 @@
+--- src/misc.c.orig 2024-03-24 19:35:50 UTC
++++ src/misc.c
+@@ -27,6 +27,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <ctype.h>
++#include <pcap/pcap.h>
+ #include <netinet/if_ether.h>
+
+ #include "ifaces.h"
diff --git a/net/netdiscover/pkg-descr b/net/netdiscover/pkg-descr
new file mode 100644
index 000000000000..432be1d10313
--- /dev/null
+++ b/net/netdiscover/pkg-descr
@@ -0,0 +1,3 @@
+Netdiscover is a network address discovering tool, developed mainly for those
+wireless networks without dhcp server, it also works on hub/switched networks.
+Its based on arp packets, it will send arp requests and sniff for replies.