net-mgmt/andwatch: Add new port

ANDwatch monitors Arp (IPV4) and Neighbor Discovery (IPv6)
packets, maintains a database of IP address to hardware
address (Ethernet) mappings, and issues notifications when
the hardware address of an IP address changes.

PR:		284907
This commit is contained in:
Denny Page 2025-03-27 15:18:43 -03:00 committed by Renato Botelho
parent 2b444dc15d
commit ef8919adec
6 changed files with 75 additions and 0 deletions

View file

@ -7,6 +7,7 @@
SUBDIR += aggregate
SUBDIR += aircrack-ng
SUBDIR += alertmanager
SUBDIR += andwatch
SUBDIR += ap-utils
SUBDIR += argus3
SUBDIR += argus3-clients

View file

@ -0,0 +1,41 @@
PORTNAME= andwatch
PORTVERSION= 2.1.0
DISTVERSIONPREFIX= v
CATEGORIES= net-mgmt
MAINTAINER= dennypage@me.com
COMMENT= ANDwatch - Arp and Neighbor Discovery monitor
WWW= https://github.com/dennypage/andwatch
LICENSE= BSD2CLAUSE
LIB_DEPENDS= libpcap.so:net/libpcap \
libsqlite3.so:databases/sqlite3 \
libcurl.so:ftp/curl
USE_GITHUB= yes
GH_ACCOUNT= dennypage
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
SUB_FILES= pkg-message
post-patch:
${REINPLACE_CMD} -e "/LIB_DIR/s,/var/lib,/var/db," \
${WRKSRC}/andwatch.h
${REINPLACE_CMD} -e 's/$$(CC)/$$(CC) $$(CFLAGS) $$(LDFLAGS)/' \
${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/andwatchd ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/andwatch-query ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/andwatch-query-ma ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/andwatch-update-ma ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/andwatch-notify.sh ${STAGEDIR}${DATADIR}
post-install:
${MKDIR} ${STAGEDIR}/var/db/andwatch
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1740595076
SHA256 (dennypage-andwatch-v2.1.0_GH0.tar.gz) = c02df4ab16214d1a4f98051d056f98a53cf33504caa8296f50b4cc8b3b6b09fc
SIZE (dennypage-andwatch-v2.1.0_GH0.tar.gz) = 20475

View file

@ -0,0 +1,20 @@
[
{ type: install
message: <<EOM
Before using ANDwatch, you must create the MAC Address database. The
The MAC Address database is created with the following command:
%%PREFIX%%/bin/andwatch-update-ma
It is generally a good idea to update the MAC Address database on a
periodic basis to incorporate new address assignments. This update
can be done via cron. Here is an example cron entry to update the
MAC Address database once per month:
0 0 1 * * root /usr/bin/nice -n20 %%PREFIX%%/bin/andwatch-update-ma
Note that the database update is performed live, and andwatchd does
not need to be stopped in order to run the update.
EOM
}
]

View file

@ -0,0 +1,4 @@
ANDwatch monitors Arp (IPV4) and Neighbor Discovery (IPv6)
packets, maintains a database of IP address to hardware
address (Ethernet) mappings, and issues notifications when
the hardware address of an IP address changes.

View file

@ -0,0 +1,6 @@
bin/andwatchd
bin/andwatch-query
bin/andwatch-query-ma
bin/andwatch-update-ma
%%DATADIR%%/andwatch-notify.sh
@dir /var/db/andwatch