Wednesday, January 30, 2019

UPDATE:=?utf-8?q?_net=2Fkismet?=

? kismet-2016.diff
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/kismet/Makefile,v
retrieving revision 1.47
diff -u -r1.47 Makefile
--- Makefile 2 Nov 2018 18:48:39 -0000 1.47
+++ Makefile 30 Jan 2019 21:54:27 -0000
@@ -2,22 +2,19 @@
# Much help came from Alexandre Anriot, Robert Nagy, Bernd Ahlers,
# and, last but not least, Pedro la Peu.

-COMMENT-main= 802.11 layer2 wireless network detector, sniffer, and IDS
-COMMENT-gpsmap= reads GPS and Network XML datafiles and plots networks
+COMMENT= 802.11 layer2 wireless network detector, sniffer, and IDS

# No wireless capabilities
NOT_FOR_ARCHS= m88k

-V= 2008-05-R1
+V= 2016-07-R1
DISTNAME= kismet-${V}
-REVISION-main = 10
-REVISION-gpsmap= 12
-PKGNAME-main= kismet-${V:S,-,,g}
-PKGNAME-gpsmap= kismet-gpsmap-${V:S,-,,g}
+PKGNAME= kismet-${V:S,-,,g}
CATEGORIES= net security

HOMEPAGE= http://www.kismetwireless.net/
MASTER_SITES= ${HOMEPAGE}code/
+EXTRACT_SUFX= .tar.xz

MAINTAINER= Matthias Kilian <kili@openbsd.org>

@@ -34,7 +31,7 @@

CONFIGURE_ARGS= --sysconfdir=${CONFDIR} \
--mandir=${PREFIX}/man \
- --disable-dbus
+ --with-suidgroup=_kismet

CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib"
@@ -47,37 +44,21 @@
# They don't have tests.
NO_TEST= Yes

-PSEUDO_FLAVORS= no_gpsmap
-FLAVOR?=
-
-MULTI_PACKAGES= -main -gpsmap
-
-WANTLIB-main= c m ncurses panel pcap ${COMPILER_LIBCXX}
-WANTLIB-gpsmap= c expat m pthread ${COMPILER_LIBCXX} z \
- MagickCore-6.Q16 gmp>=6
-LIB_DEPENDS-gpsmap= graphics/ImageMagick \
- devel/gmp
+WANTLIB+= c m panel pcap ${COMPILER_LIBCXX} curses util pcre
+LIB_DEPENDS= devel/pcre
+RUN_DEPENDS= net/wireshark,-text

.include <bsd.port.arch.mk>

-.if !${BUILD_PACKAGES:M-gpsmap}
-CONFIGURE_ARGS+= --disable-gpsmap
-.endif
-
post-configure:
- @cd ${WRKSRC} && ${GMAKE} depend
-
-post-patch:
- @perl -pi -e \
- 's,/usr/local/etc(/kismet.conf),${CONFDIR}$$1,' \
- ${WRKSRC}/man/kismet.conf.5
- @perl -pi -e \
- 's,/usr/local/etc(/kismet.conf),${CONFDIR}$$1,' \
- ${WRKSRC}/man/kismet_drone.conf.5
+ ${SUBST_CMD} ${WRKSRC}/conf/kismet.conf \
+ ${WRKSRC}/man/kismet_drone.conf.5
+ cd ${WRKSRC} && ${GMAKE} depend

post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/kismet
${INSTALL_DATA} ${WRKSRC}/README \
${PREFIX}/share/doc/kismet
+ @cd ${WRKSRC} && ${GMAKE} binsuidinstall

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/kismet/distinfo,v
retrieving revision 1.8
diff -u -r1.8 distinfo
--- distinfo 18 Jan 2015 03:14:41 -0000 1.8
+++ distinfo 30 Jan 2019 21:54:27 -0000
@@ -1,2 +1,2 @@
-SHA256 (kismet-2008-05-R1.tar.gz) = opjUT4puyXcCHNSSpyCYfe2BtcS69faLNvEoKiPJ99M=
-SIZE (kismet-2008-05-R1.tar.gz) = 655362
+SHA256 (kismet-2016-07-R1.tar.xz) = vbIfFTMR8f87FmIb8NZ0D2Y2m/CYKwoonJoSr4hH4jc=
+SIZE (kismet-2016-07-R1.tar.xz) = 709364
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- patches/patch-Makefile_in 17 May 2017 16:03:32 -0000 1.8
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,226 +0,0 @@
-$OpenBSD: patch-Makefile_in,v 1.8 2017/05/17 16:03:32 espie Exp $
-
-# Don't hard code -O2 -Wall.
-# Use BSD_INSTALL_* macros for installation.
-
-Index: Makefile.in
---- Makefile.in.orig
-+++ Makefile.in
-@@ -20,9 +20,10 @@ CC = @CC@
- LD = @CXX@
- LDFLAGS = @LDFLAGS@
- LIBS = @LIBS@
-+LIBZ = -lz
- CLIBS = @CLIBS@
- CFLAGS = @CFLAGS@
--CXXFLAGS = -O2 -Wall -DVERSION_MAJOR=\"$(VERSION_MAJOR)\" -DVERSION_MINOR=\"$(VERSION_MINOR)\" -DVERSION_TINY=\"$(VERSION_TINY)\" -DTIMESTAMP=\"`cat TIMESTAMP`\" @CXXFLAGS@
-+CXXFLAGS = -DVERSION_MAJOR=\"$(VERSION_MAJOR)\" -DVERSION_MINOR=\"$(VERSION_MINOR)\" -DVERSION_TINY=\"$(VERSION_TINY)\" -DTIMESTAMP=\"`cat TIMESTAMP`\" @CXXFLAGS@
- CPPFLAGS = @CPPFLAGS@
- SUID = @suid@
-
-@@ -101,8 +102,8 @@ $(GPSL): $(GPSLBUILDO)
- @if test "$(GPSLBUILD)"x = "x"; then \
- echo "Gpsmap cannot be built, check the output of configure"; \
- else \
-- echo $(LD) $(LDFLAGS) -o $(GPSL) $(GPSLO) $(LIBS) `Magick-config --cflags --cppflags --ldflags` `Magick-config --libs` $(THREADL) -lexpat -lgmp; \
-- $(LD) $(LDFLAGS) -o $(GPSL) $(GPSLO) $(LIBS) `Magick-config --cflags --cppflags --ldflags` `Magick-config --libs` $(THREADL) -lexpat -lgmp; \
-+ echo $(LD) $(LDFLAGS) -o $(GPSL) $(GPSLO) $(LIBS) `Magick-config --cflags --cppflags --ldflags` `Magick-config --libs` $(THREADL) -lexpat -lgmp $(LIBZ); \
-+ $(LD) $(LDFLAGS) -o $(GPSL) $(GPSLO) $(LIBS) `Magick-config --cflags --cppflags --ldflags` `Magick-config --libs` $(THREADL) -lexpat -lgmp $(LIBZ); \
- fi
-
- #$(HOPPER): $(HOPPERO)
-@@ -138,53 +139,55 @@ checkuiconfig:
- echo "latest version is `grep version= conf/kismet_ui.conf | cut -f 2 -d=`"; \
- fi
-
-+.PHONY: binuserinstall
-+
- binuserinstall:
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(PS) $(BIN)/$(PS);
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(DRONE) $(BIN)/$(DRONE);
-+ $(BSD_INSTALL_PROGRAM) $(PS) $(BIN)/$(PS);
-+ $(BSD_INSTALL_PROGRAM) $(DRONE) $(BIN)/$(DRONE);
-
- binsuidinstall:
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 4755 $(PS) $(BIN)/$(PS);
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 4755 $(DRONE) $(BIN)/$(DRONE);
-+ $(BSD_INSTALL_PROGRAM) -m 4755 $(PS) $(BIN)/$(PS);
-+ $(BSD_INSTALL_PROGRAM) -m 4755 $(DRONE) $(BIN)/$(DRONE);
-
- commoninstall:
-- mkdir -p $(ETC)
-- mkdir -p $(BIN)
-+ $(BSD_INSTALL_DATA_DIR) $(ETC)
-+ $(BSD_INSTALL_PROGRAM_DIR) $(BIN)
-
-- install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(WRAP) $(BIN)/kismet
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(NC) $(BIN)/$(NC)
-- # install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(HOPPER) $(BIN)/$(HOPPER)
-+ $(BSD_INSTALL_PROGRAM) $(WRAP) $(BIN)/kismet
-+ $(BSD_INSTALL_PROGRAM) $(NC) $(BIN)/$(NC)
-+ # $(BSD_INSTALL_PROGRAM) $(HOPPER) $(BIN)/$(HOPPER)
- @if test "$(ZAURUS)" = "yes"; then \
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(BUZZER) $(BIN)/buzzme; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(BUZZER) $(BIN)/buzzme; \
-+ $(BSD_INSTALL_PROGRAM) $(BUZZER) $(BIN)/buzzme; \
-+ echo $(BSD_INSTALL_PROGRAM) $(BUZZER) $(BIN)/buzzme; \
- fi
--#install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/kismet_monitor $(BIN)/kismet_monitor
--#install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/kismet_unmonitor $(BIN)/kismet_unmonitor
-- mkdir -p $(MAN)/man1
-- install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet.1 $(MAN)/man1/kismet.1
-- # install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_monitor.1 $(MAN)/man1/kismet_monitor.1
-- # install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_hopper.1 $(MAN)/man1/kismet_hopper.1
-- install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_drone.1 $(MAN)/man1/kismet_drone.1
-- mkdir -p $(MAN)/man5
-- install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet.conf.5 $(MAN)/man5/kismet.conf.5
-- install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_ui.conf.5 $(MAN)/man5/kismet_ui.conf.5
-- install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_drone.conf.5 $(MAN)/man5/kismet_drone.conf.5
-+#$(BSD_INSTALL_SCRIPT) scripts/kismet_monitor $(BIN)/kismet_monitor
-+#$(BSD_INSTALL_SCRIPT) scripts/kismet_unmonitor $(BIN)/kismet_unmonitor
-+ $(BSD_INSTALL_MAN_DIR) $(MAN)/man1
-+ $(BSD_INSTALL_MAN) man/kismet.1 $(MAN)/man1/kismet.1
-+ # $(BSD_INSTALL_MAN) man/kismet_monitor.1 $(MAN)/man1/kismet_monitor.1
-+ # $(BSD_INSTALL_MAN) man/kismet_hopper.1 $(MAN)/man1/kismet_hopper.1
-+ $(BSD_INSTALL_MAN) man/kismet_drone.1 $(MAN)/man1/kismet_drone.1
-+ $(BSD_INSTALL_MAN_DIR) $(MAN)/man5
-+ $(BSD_INSTALL_MAN) man/kismet.conf.5 $(MAN)/man5/kismet.conf.5
-+ $(BSD_INSTALL_MAN) man/kismet_ui.conf.5 $(MAN)/man5/kismet_ui.conf.5
-+ $(BSD_INSTALL_MAN) man/kismet_drone.conf.5 $(MAN)/man5/kismet_drone.conf.5
-
- @if test "$(GPSLBUILD)" = "$(GPSL)"; then \
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(GPSL) $(BIN)/$(GPSL); \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(GPSL) $(BIN)/$(GPSL); \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/gpsmap-helper-earthamaps $(BIN)/gpsmap-helper-earthamaps; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/gpsmap-helper-earthamaps $(BIN)/gpsmap-helper-earthamaps; \
-- install -o $(INSTUSR) -g $(MANGRP) -m 644 man/gpsmap.1 $(MAN)/man1/gpsmap.1; \
-- echo install -o $(INSTUSR) -g $(MANGRP) -m 644 man/gpsmap.1 $(MAN)/man1/gpsmap.1; \
-+ $(BSD_INSTALL_PROGRAM) $(GPSL) $(BIN)/$(GPSL); \
-+ echo $(BSD_INSTALL_PROGRAM) $(GPSL) $(BIN)/$(GPSL); \
-+ $(BSD_INSTALL_SCRIPT) scripts/gpsmap-helper-earthamaps $(BIN)/gpsmap-helper-earthamaps; \
-+ echo $(BSD_INSTALL_SCRIPT) scripts/gpsmap-helper-earthamaps $(BIN)/gpsmap-helper-earthamaps; \
-+ $(BSD_INSTALL_MAN) man/gpsmap.1 $(MAN)/man1/gpsmap.1; \
-+ echo $(BSD_INSTALL_MAN) man/gpsmap.1 $(MAN)/man1/gpsmap.1; \
- fi
-
-- mkdir -p $(WAV)
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 wav/new_network.wav $(WAV)/new_network.wav
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 wav/traffic.wav $(WAV)/traffic.wav
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 wav/junk_traffic.wav $(WAV)/junk_traffic.wav
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 wav/alert.wav $(WAV)/alert.wav
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/ap_manuf $(ETC)/ap_manuf;
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/client_manuf $(ETC)/client_manuf;
-+ $(BSD_INSTALL_DATA_DIR) $(WAV)
-+ $(BSD_INSTALL_DATA) wav/new_network.wav $(WAV)/new_network.wav
-+ $(BSD_INSTALL_DATA) wav/traffic.wav $(WAV)/traffic.wav
-+ $(BSD_INSTALL_DATA) wav/junk_traffic.wav $(WAV)/junk_traffic.wav
-+ $(BSD_INSTALL_DATA) wav/alert.wav $(WAV)/alert.wav
-+ $(BSD_INSTALL_DATA) conf/ap_manuf $(ETC)/ap_manuf;
-+ $(BSD_INSTALL_DATA) conf/client_manuf $(ETC)/client_manuf;
-
- @if test -f $(BIN)/kismet_curses; then \
- echo "Removing old kismet_curses binary. The panels frontend is now kismet_client."; \
-@@ -197,22 +200,22 @@ suidinstall: $(PS) $(DRONE) $(WRAP) $(NC) $(GPSLBUILD)
- @if test -f $(ETC)/kismet.conf; then \
- $(MAKE) -e checkconfig; \
- else \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet.conf $(ETC)/kismet.conf; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet.conf $(ETC)/kismet.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet.conf $(ETC)/kismet.conf; \
-+ echo $(BSD_INSTALL_DATA) conf/kismet.conf $(ETC)/kismet.conf; \
- echo "Installed config into $(ETC)/kismet.conf."; \
- fi
- @if test -f $(ETC)/kismet_drone.conf; then \
- $(MAKE) -e checkdroneconfig; \
- else \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-+ echo $(BSD_INSTALL_DATA) conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
- echo "Installed drone config into $(ETC)/kismet_drone.conf."; \
- fi
- @if test -f $(ETC)/kismet_ui.conf; then \
- $(MAKE) -e checkuiconfig; \
- else \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-+ echo $(BSD_INSTALL_DATA) conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
- echo "Installed UI config into $(ETC)/kismet_ui.conf."; \
- fi
- @echo "Installed kismet into $(BIN)/."
-@@ -230,22 +233,22 @@ install: $(PS) $(DRONE) $(NC) $(WRAP) $(GPSLBUILD) $(Z
- @if test -f $(ETC)/kismet.conf; then \
- $(MAKE) -e checkconfig; \
- else \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet.conf $(ETC)/kismet.conf; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet.conf $(ETC)/kismet.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet.conf $(ETC)/kismet.conf; \
-+ echo $(BSD_INSTALL_DATA) conf/kismet.conf $(ETC)/kismet.conf; \
- echo "Installed config into $(ETC)/kismet.conf."; \
- fi
- @if test -f $(ETC)/kismet_drone.conf; then \
- $(MAKE) -e checkdroneconfig; \
- else \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-+ echo $(BSD_INSTALL_DATA) conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
- echo "Installed drone config into $(ETC)/kismet_drone.conf."; \
- fi
- @if test -f $(ETC)/kismet_ui.conf; then \
- $(MAKE) -e checkuiconfig; \
- else \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-+ echo $(BSD_INSTALL_DATA) conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
- echo "Installed UI config into $(ETC)/kismet_ui.conf."; \
- fi
- @echo "Installed kismet into $(BIN)/."
-@@ -261,11 +264,11 @@ install: $(PS) $(DRONE) $(NC) $(WRAP) $(GPSLBUILD) $(Z
- forceinstall: $(PS)
- $(MAKE) -e commoninstall
- $(MAKE) -e binuserinstall
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet.conf $(ETC)/kismet.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet.conf $(ETC)/kismet.conf; \
- echo "Installed config into $(ETC)/kismet.conf.";
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
- echo "Installed drone config into $(ETC)/kismet_drone.conf.";
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
- echo "Installed UI config into $(ETC)/kismet_ui.conf.";
- @echo "Installed kismet into $(BIN)/."
- @echo "If you have not done so already, read the README file and the FAQ file. Additional"
-@@ -280,11 +283,11 @@ forceinstall: $(PS)
- suidforceinstall: $(PS)
- $(MAKE) -e commoninstall
- $(MAKE) -e binsuidinstall
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet.conf $(ETC)/kismet.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet.conf $(ETC)/kismet.conf; \
- echo "Installed config into $(ETC)/kismet.conf.";
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
- echo "Installed drone config into $(ETC)/kismet_drone.conf.";
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
- echo "Installed UI config into $(ETC)/kismet_ui.conf.";
- @echo "Installed kismet into $(BIN)/."
- @echo "If you have not done so already, read the README file and the FAQ file. Additional"
-@@ -371,13 +374,11 @@ depend:
- @$(MAKE) $(DEPEND)
-
- $(DEPEND):
-- @-rm -f $(DEPEND)
-+ @rm -f $(DEPEND)
- @echo "Generating dependencies... "
- @echo > $(DEPEND)
-- @$(CXX) $(CFLAGS) -MM \
-+ @$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MM \
- `echo $(PSO) $(DRONEO) $(GPSLO) $(NCO) | sed -e "s/\.o/\.cc/g" | sed -e "s/\.mo/\.m/g"` >> $(DEPEND)
--
--include $(DEPEND)
-
- .c.o: $(DEPEND)
- $(CC) $(CFLAGS) -c $*.c -o $@
Index: patches/patch-alertracker_h
===================================================================
RCS file: patches/patch-alertracker_h
diff -N patches/patch-alertracker_h
--- patches/patch-alertracker_h 17 May 2017 16:03:32 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-alertracker_h,v 1.1 2017/05/17 16:03:32 espie Exp $
-
-Index: alertracker.h
---- alertracker.h.orig
-+++ alertracker.h
-@@ -43,7 +43,7 @@ enum alert_time_unit {
- class Alertracker {
- public:
- // A registered alert type
-- typedef struct alert_rec {
-+ struct alert_rec {
- int ref_index;
- string header;
-
Index: patches/patch-conf_kismet_conf_in
===================================================================
RCS file: /cvs/ports/net/kismet/patches/patch-conf_kismet_conf_in,v
retrieving revision 1.6
diff -u -r1.6 patch-conf_kismet_conf_in
--- patches/patch-conf_kismet_conf_in 10 Nov 2007 21:10:42 -0000 1.6
+++ patches/patch-conf_kismet_conf_in 30 Jan 2019 21:54:27 -0000
@@ -1,58 +1,46 @@
-$OpenBSD: patch-conf_kismet_conf_in,v 1.6 2007/11/10 21:10:42 kili Exp $
---- conf/kismet.conf.in.orig Sun Oct 7 17:48:51 2007
-+++ conf/kismet.conf.in Sun Oct 7 17:51:25 2007
-@@ -10,7 +10,7 @@ version=2007.09.R1
- servername=Kismet
-
- # User to setid to (should be your normal user)
--suiduser=your_user_here
-+suiduser=_kismet
-
- # Do we try to put networkmanager to sleep? If you use NM, this is probably
- # what you want to do, so that it will leave the interfaces alone while
-@@ -24,6 +24,10 @@ networkmanagersleep=true
- # The initial channel is optional, if hopping is not enabled it can be used
- # to set the channel the interface listens on.
- # YOU MUST CHANGE THIS TO BE THE SOURCE YOU WANT TO USE
-+# OpenBSD examples:
-+# a/b: source=radiotap_bsd_ab,ath0,radiotap_bsd_ab
-+# b: source=radiotap_bsd_b,ipw0,radiotap_bsd_b
-+# b (wi(4)) source=prism2_openbsd,wi0,prism2_openbsd
- source=none,none,addme
+$OpenBSD$
+
+Index: conf/kismet.conf.in
+--- conf/kismet.conf.in.orig
++++ conf/kismet.conf.in
+@@ -11,7 +11,7 @@ version=2009-newcore
+ # servername=Kismet Server
+
+ # Prefix of where we log (as used in the logtemplate later)
+-# logprefix=/some/path/to/logs
++logprefix=${LOCALSTATEDIR}/log/kismet
+
+ # Do we process the contents of data frames? If this is enabled, data
+ # frames will be truncated to the headers only immediately after frame type
+@@ -30,6 +30,8 @@ allowplugins=true
+ # ncsource=wlan0
+ # ncsource=wifi0:type=madwifi
+ # ncsource=wlan0:name=intel,hop=false,channel=11
++# Generic OpenBSD example
++# ncsource=rum0:type=radiotap_bsd

# Comma-separated list of sources to enable. This is only needed if you defined
-@@ -206,7 +210,7 @@ trackivs=false
- # server itself will play sound. Primarily for headless or automated systems.
- sound=false
- # Path to sound player
--soundplay=/usr/bin/play
-+soundplay=/usr/local/bin/play
- # Optional parameters to pass to the player
- # soundopts=--volume=.3
- # New network found
-@@ -264,7 +268,7 @@ metric=false
- # recent versions of GPSDrive's native support of Kismet.
- waypoints=false
- # GPSDrive waypoint file. This WILL be truncated.
--waypointdata=%h/.gpsdrive/way_kismet.txt
-+waypointdata=/var/log/kismet/way_kismet.txt
- # Do we want ESSID or BSSID as the waypoint name ?
- waypoint_essid=false
-
-@@ -362,14 +366,14 @@ logdefault=Kismet
- # crypt/Pok-Dec-20-01-1
- # and so on. The "dump", "crypt", etc, dirs must exist before kismet is run
- # in this case.
--logtemplate=%n-%d-%i.%l
-+logtemplate=/var/log/kismet/%n-%d-%i.%l
-
- # Where do we store the pid file of the server?
- piddir=/var/run/
-
- # Where state info, etc, is stored. You shouldnt ever need to change this.
- # This is a directory.
--configdir=%h/.kismet/
-+configdir=/var/log/kismet/
+ # multiple sources and only want to enable some of them. By default, all defined
+@@ -122,10 +124,7 @@ maxbacklog=5000
+ # OUI file, expected format 00:11:22<tab>manufname
+ # IEEE OUI file used to look up manufacturer info. We default to the
+ # wireshark one since most people have that.
+-ouifile=/etc/manuf
+-ouifile=/usr/share/wireshark/wireshark/manuf
+-ouifile=/usr/share/wireshark/manuf
+-ouifile=/Applications/Wireshark.app/Contents/Resources/share/wireshark/manuf
++ouifile=${LOCALBASE}/share/wireshark/manuf
+
+ # Do we have a GPS?
+ gps=true
+@@ -278,8 +277,8 @@ alertbacklog=50
+ logtypes=pcapdump,gpsxml,netxml,nettxt,alert
+
+ # Format of the pcap dump (PPI or 80211)
+-pcapdumpformat=ppi
+-# pcapdumpformat=80211
++# pcapdumpformat=ppi
++pcapdumpformat=80211

- # cloaked SSID file. You shouldn't ever need to change this.
- ssidmap=ssid_map
+ # Default log title
+ logdefault=Kismet
Index: patches/patch-conf_kismet_drone_conf
===================================================================
RCS file: patches/patch-conf_kismet_drone_conf
diff -N patches/patch-conf_kismet_drone_conf
--- patches/patch-conf_kismet_drone_conf 27 Jul 2005 21:37:26 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-conf_kismet_drone_conf,v 1.1.1.1 2005/07/27 21:37:26 robert Exp $
---- conf/kismet_drone.conf.orig Wed Jun 22 06:22:13 2005
-+++ conf/kismet_drone.conf Sun Jun 26 22:04:56 2005
-@@ -6,7 +6,7 @@ version=Feb.04.01a
- servername=Kismet
-
- # User to setid to (should be your normal user)
--suiduser=your_user_here
-+suiduser=_kismet
-
- # Port to serve packet data... This probably shouldn't be the same as the port
- # you configured kismet_server for, or else you'll have problems running them
Index: patches/patch-conf_kismet_ui_conf_in
===================================================================
RCS file: patches/patch-conf_kismet_ui_conf_in
diff -N patches/patch-conf_kismet_ui_conf_in
--- patches/patch-conf_kismet_ui_conf_in 10 Nov 2007 21:10:42 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-conf_kismet_ui_conf_in,v 1.2 2007/11/10 21:10:42 kili Exp $
---- conf/kismet_ui.conf.in.orig Sun Sep 9 23:01:01 2007
-+++ conf/kismet_ui.conf.in Sun Sep 9 23:06:28 2007
-@@ -24,7 +24,7 @@ clientcolumns=decay,type,mac,manuf,data,crypt,size,ip,
- # noise on whatever host it's running on.
- sound=true
- # Path to sound player
--soundplay=/usr/bin/play
-+soundplay=/usr/local/bin/play
- # Optional parameters to pass to the player
- # soundopts=--volume=.3
- # New network found
Index: patches/patch-config_h_in
===================================================================
RCS file: /cvs/ports/net/kismet/patches/patch-config_h_in,v
retrieving revision 1.1
diff -u -r1.1 patch-config_h_in
--- patches/patch-config_h_in 17 May 2017 16:03:32 -0000 1.1
+++ patches/patch-config_h_in 30 Jan 2019 21:54:27 -0000
@@ -1,13 +1,15 @@
-$OpenBSD: patch-config_h_in,v 1.1 2017/05/17 16:03:32 espie Exp $
+$OpenBSD$
+
+shut up:
+warning: using directive refers to implicitly-defined namespace 'std'

Index: config.h.in
--- config.h.in.orig
+++ config.h.in
-@@ -291,6 +291,8 @@
+@@ -317,6 +317,7 @@

/* Namespace (on non-obj-c files) */
#ifndef __IN_OBJC_FILE__
-+/* prevent clang from complaining about premature namespace */
+#include <iosfwd>
using namespace std;
#define __STL_USE_NAMESPACES
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- patches/patch-configure 11 Nov 2010 14:11:34 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-configure,v 1.3 2010/11/11 14:11:34 espie Exp $
---- configure.orig Mon May 12 22:14:14 2008
-+++ configure Thu Nov 11 15:01:31 2010
-@@ -9474,7 +9474,7 @@ if test $ac_cv_lib_z_gzopen = yes; then
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_LIBZ 1
- _ACEOF
-- LIBS="$LIBS -lz" libz="yes"
-+ libz="yes"
- else
- { echo "$as_me:$LINENO: WARNING: Unable to find libz compression" >&5
- echo "$as_me: WARNING: Unable to find libz compression" >&2;}
-@@ -9877,7 +9877,7 @@ sharedatadir=`(
- test "$exec_prefix" = NONE && exec_prefix=${prefix}
- eval echo "$sharedatadir"
- )`
--sharedatadir=${sharedatadir}
-+eval sharedatadir=${sharedatadir}
-
-
- ac_config_files="$ac_config_files Makefile extra/buzzme/Makefile extra/Makefile conf/kismet.conf conf/kismet_ui.conf"
Index: patches/patch-dronesource_cc
===================================================================
RCS file: patches/patch-dronesource_cc
diff -N patches/patch-dronesource_cc
--- patches/patch-dronesource_cc 12 Apr 2018 17:55:08 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-dronesource_cc,v 1.1 2018/04/12 17:55:08 jasper Exp $
-
-Index: dronesource.cc
---- dronesource.cc.orig
-+++ dronesource.cc
-@@ -58,7 +58,7 @@ int DroneSource::OpenSource() {
- local_sock.sin_addr.s_addr = htonl(INADDR_ANY);
- local_sock.sin_port = htons(0);
-
-- if (bind(drone_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
-+ if (::bind(drone_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
- snprintf(errstr, 1024, "bind() failed %d (%s)\n", errno, strerror(errno));
- return (-3);
- }
Index: patches/patch-finitestate_cc
===================================================================
RCS file: patches/patch-finitestate_cc
diff -N patches/patch-finitestate_cc
--- patches/patch-finitestate_cc 12 Apr 2018 17:55:08 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-finitestate_cc,v 1.1 2018/04/12 17:55:08 jasper Exp $
-
-Index: finitestate.cc
---- finitestate.cc.orig
-+++ finitestate.cc
-@@ -224,7 +224,7 @@ int BssTimestampAutomata::ProcessPacket(const packet_i
- // Generate an alert, we're getting a bunch of invalid timestamps
-
- snprintf(atext, STATUS_MAX, "Out-of-sequence BSS timestamp on %s "
-- "- got %"PRIx64", expected %"PRIx64" - this could indicate AP spoofing",
-+ "- got %" PRIx64 ", expected %" PRIx64 " - this could indicate AP spoofing",
- in_info->bssid_mac.Mac2String().c_str(), in_info->timestamp,
- elem->bss_timestamp);
- atracker->RaiseAlert(alertid, in_info->bssid_mac, 0, 0, 0,
Index: patches/patch-frontend_h
===================================================================
RCS file: patches/patch-frontend_h
diff -N patches/patch-frontend_h
--- patches/patch-frontend_h 17 May 2017 16:03:32 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-frontend_h,v 1.1 2017/05/17 16:03:32 espie Exp $
-
-Index: frontend.h
---- frontend.h.orig
-+++ frontend.h
-@@ -56,7 +56,7 @@ enum group_type {
- };
-
- // What do we actually display
--typedef struct display_network {
-+struct display_network {
- // Are we a group or just a single network?
- group_type type;
- // If we're a group, this will hold multiple networks
Index: patches/patch-gpsd_cc
===================================================================
RCS file: patches/patch-gpsd_cc
diff -N patches/patch-gpsd_cc
--- patches/patch-gpsd_cc 12 Apr 2018 17:55:08 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-gpsd_cc,v 1.1 2018/04/12 17:55:08 jasper Exp $
-
-Index: gpsd.cc
---- gpsd.cc.orig
-+++ gpsd.cc
-@@ -93,7 +93,7 @@ int GPSD::OpenGPSD() {
- localaddr.sin_addr.s_addr = htonl(INADDR_ANY);
- localaddr.sin_port = htons(0);
-
-- if (bind(sock, (struct sockaddr *) &localaddr, sizeof(localaddr)) < 0) {
-+ if (::bind(sock, (struct sockaddr *) &localaddr, sizeof(localaddr)) < 0) {
- snprintf(errstr, 1024, "GPSD cannot bind port: %s", strerror(errno));
- CloseGPSD();
- return -1;
Index: patches/patch-gpsd_h
===================================================================
RCS file: patches/patch-gpsd_h
diff -N patches/patch-gpsd_h
--- patches/patch-gpsd_h 10 Sep 2016 13:03:42 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-gpsd_h,v 1.1 2016/09/10 13:03:42 ajacoutot Exp $
---- gpsd.h.orig Sat Sep 10 11:52:50 2016
-+++ gpsd.h Sat Sep 10 11:53:11 2016
-@@ -22,6 +22,7 @@
- #include "config.h"
-
- #include <sys/types.h>
-+#include <sys/select.h> /* fd_set */
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
Index: patches/patch-gpsdump_cc
===================================================================
RCS file: patches/patch-gpsdump_cc
diff -N patches/patch-gpsdump_cc
--- patches/patch-gpsdump_cc 17 May 2017 16:03:32 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-gpsdump_cc,v 1.1 2017/05/17 16:03:32 espie Exp $
-
-Index: gpsdump.cc
---- gpsdump.cc.orig
-+++ gpsdump.cc
-@@ -108,7 +108,7 @@ int GPSDump::DumpTrack(GPSD *in_gps) {
-
- int sig = 0, qual = 0, noise = 0;
-
-- if (time(0) - last_info.ts.tv_sec < decay && last_info.quality != -1) {
-+ if (time(0) - last_info.ts.tv_sec < rdecay && last_info.quality != -1) {
- sig = last_info.signal;
- qual = last_info.quality;
- noise = last_info.noise;
Index: patches/patch-gpsdump_h
===================================================================
RCS file: patches/patch-gpsdump_h
diff -N patches/patch-gpsdump_h
--- patches/patch-gpsdump_h 17 May 2017 16:03:32 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-gpsdump_h,v 1.1 2017/05/17 16:03:32 espie Exp $
-
-Index: gpsdump.h
---- gpsdump.h.orig
-+++ gpsdump.h
-@@ -41,7 +41,7 @@
- // Link to last_info in kismet_server.cc
- extern packet_info last_info;
- // Link to decay rate in kismet_server.cc
--extern int decay;
-+extern int rdecay;
-
- #define GPS_VERSION 5
-
Index: patches/patch-gpsmap_cc
===================================================================
RCS file: patches/patch-gpsmap_cc
diff -N patches/patch-gpsmap_cc
--- patches/patch-gpsmap_cc 18 May 2017 12:41:58 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,308 +0,0 @@
-$OpenBSD: patch-gpsmap_cc,v 1.7 2017/05/18 12:41:58 espie Exp $
-
-# Disable map sources known to be broken.
-# Use our ftp(1) instead of wget.
-# Fix OSM map source (OSM already provides PNGs, not GIFs).
-# If the first attempt to load the image fails, reset the exception,
-# because ImageMagick would bail out on the second attempt (after the
-# download).
-
-Index: gpsmap.cc
---- gpsmap.cc.orig
-+++ gpsmap.cc
-@@ -90,24 +90,24 @@ const char *config_base = "kismet.conf";
- // Broken map sources... Damn vendors changing.
- // Mappoint
- // const char url_template_mp[] = "http://msrvmaps.mappoint.net/isapi/MSMap.dll?ID=3XNsF.&C=%f,%f&L=USA&CV=1&A=%ld&S=%d,%d&O=0.000000,0.000000&MS=0&P=|5748|";
-+// Terraserver photo-maps and topo maps
-+// const char url_template_ts[] = "http://terraservice.net/GetImageArea.ashx?t=1&lat=%f&lon=%f&s=%ld&w=%d&h=%d";
-+// const char url_template_tt[] = "http://terraservice.net/GetImageArea.ashx?t=2&lat=%f&lon=%f&s=%ld&w=%d&h=%d";
-
-+// Earthamaps need a perl helper script to get data because of cookies
-+// const char url_template_em[] = "gpsmap-helper-earthamaps %s %f %f %d %d %ld";
- // Mapblast
- const char url_template_mb[] = "http://go.vicinity.com/homedepotvd/MakeMap.d?&CT=%f:%f:%ld&IC=&W=%d&H=%d&FAM=mblast&LB=%s";
-
--// Terraserver photo-maps and topo maps
--const char url_template_ts[] = "http://terraservice.net/GetImageArea.ashx?t=1&lat=%f&lon=%f&s=%ld&w=%d&h=%d";
--const char url_template_tt[] = "http://terraservice.net/GetImageArea.ashx?t=2&lat=%f&lon=%f&s=%ld&w=%d&h=%d";
- // Tiger census vector maps
- const char url_template_ti[] = "http://tiger.census.gov/cgi-bin/mapper/map.gif?lat=%f&lon=%f&wid=0.001&ht=%f&iwd=%d&iht=%d&on=majroads&on=places&on=shorelin&on=streets&on=interstate&on=statehwy&on=ushwy&on=water&tlevel=-&tvar=-&tmeth=i";
--// Earthamaps need a perl helper script to get data because of cookies
--const char url_template_em[] = "gpsmap-helper-earthamaps %s %f %f %d %d %ld";
-
- const char url_template_euex[] = "http://www.expedia.de/pub/agent.dll?qscr=mrdt&ID=3XNsF.&CenP=%f,%f&Lang=%s&Alti=%ld&Size=%d,%d&Offs=0.000000,0.000000&BCheck=1";
-
- const char url_template_osm[] = "http://tah.openstreetmap.org/MapOf/?lat=%f&long=%f&z=%d&w=%d&h=%d&format=png";
-
--// Download template for sources that we fetch using wget
--const char download_template[] = "wget \"%s\" -O %s";
-+// Download template for sources that we fetch using ftp
-+const char download_template[] = "/usr/bin/ftp -o %s \"%s\"";
-
- // Image scales we try to autofetch
- long int scales[] = { 1000, 2000, 5000, 10000, 20000, 30000, 50000, 60000,
-@@ -182,7 +182,7 @@ char *channelcolors[] = {
- "#808080", "#CCCCCC"
- };
- */
--char *channelcolors[] = {
-+const char *channelcolors[] = {
- "#FF0000", "#FF6000", "#A08000",
- "#80A000", "#60FF00", "#00FF00",
- "#00FF60", "#00A080", "#0080A0",
-@@ -191,7 +191,7 @@ char *channelcolors[] = {
- int channelcolor_max = 14;
-
- // Origional
--char *powercolors_Orig[] = {
-+const char *powercolors_Orig[] = {
- "#FF0000", "#FFD500", "#FFCC00",
- "#F2FF00", "#7BFF00", "#00FFB6",
- "#00FFFF", "#005DFF", "#A100FF",
-@@ -199,7 +199,7 @@ char *powercolors_Orig[] = {
- };
- const int power_steps_Orig = 10;
- // Blue powercolors
--char *powercolors_Blue[] = {
-+const char *powercolors_Blue[] = {
- "#A0A0FF",
- "#9B9BFA",
- "#9696F5",
-@@ -236,7 +236,7 @@ char *powercolors_Blue[] = {
- const int power_steps_Blue = 32;
-
- // Math progression
--char *powercolors_Math[] = {
-+const char *powercolors_Math[] = {
- "#FF0000", "#FF8000", "#FFFF00",
- "#80FF00", "#00FF00", "#00FF80",
- "#00FFFF", "#0080FF", "#0000FF",
-@@ -244,7 +244,7 @@ char *powercolors_Math[] = {
- };
- const int power_steps_Math = 12;
- // Weather Radar
--char *powercolors_Radar[] = {
-+const char *powercolors_Radar[] = {
- "#50E350", "#39C339", "#208420",
- "#145A14", "#C8C832", "#DC961E",
- "#811610", "#B31A17", "#E61E1E"
-@@ -256,7 +256,7 @@ const int power_max = 255;
- int powercolor_index = 0;
-
- // Label gravity
--char *label_gravity_list[] = {
-+const char *label_gravity_list[] = {
- "northwest", "north", "northeast",
- "west", "center", "east",
- "southwest", "south", "southeast"
-@@ -297,7 +297,7 @@ bool hullPoint::operator() (const hullPoint& a, const
- return a.angle < b.angle;
- }
-
--typedef struct gps_network {
-+struct gps_network {
-
- gps_network() {
- filtered = 0;
-@@ -411,7 +411,7 @@ int mapsource = -1;
- int power_resolution = 5;
- // Interpolation colors
- // strength colors
--char **power_colors = NULL;
-+const char **power_colors = NULL;
- int power_steps = 0;
- // Center resolution (size of circle)
- int center_resolution = 2;
-@@ -1512,29 +1512,6 @@ int BestMapScale(long int *in_mapscale, long int *in_f
- double mapx, mapy;
- double map2x, map2y;
-
-- if ((mapsource == MAPSOURCE_TERRA) || (mapsource == MAPSOURCE_TERRATOPO)) {
-- for (int x = 0; terrascales[x] != -1; x++) {
-- calcxy(&mapx, &mapy, tlat, tlon,
-- (double) terrascales[x]/PIXELFACT,
-- map_avg_lat, map_avg_lon);
-- calcxy(&map2x, &map2y, blat, blon,
-- (double) terrascales[x]/PIXELFACT,
-- map_avg_lat, map_avg_lon);
--
-- if ((mapx < 0 || mapx > map_width || mapy < 0 ||
-- mapy > map_height) ||
-- (map2x < 0 || map2x > map_width ||
-- map2y < 0 || map2y > map_height)) {
-- continue;
-- } else {
-- (*in_mapscale) = terrascales[x];
-- (*in_fetchscale) = x + 10;
-- return 1;
-- }
-- }
-- return -1;
-- }
--
- if (mapsource == MAPSOURCE_EUEX) {
- for (int x = 0; euexscales[x] != -1; x++) {
- calcxy(&mapx, &mapy, tlat, tlon,
-@@ -1581,35 +1558,6 @@ int BestMapScale(long int *in_mapscale, long int *in_f
- return -1;
- }
-
-- if (mapsource == MAPSOURCE_EARTHAMAPS) {
-- // Find how many scales we have
-- int nscales;
-- for (nscales = 0; earthamapscales[nscales] != -1; nscales++)
-- ; // Nothing
--
-- for (int x = (nscales - 1); x > 1; x--) {
-- calcxy(&mapx, &mapy, tlat, tlon,
-- (double) earthamapscales[x]/PIXELFACT,
-- map_avg_lat, map_avg_lon);
-- calcxy(&map2x, &map2y, blat, blon,
-- (double) earthamapscales[x]/PIXELFACT,
-- map_avg_lat, map_avg_lon);
--
-- if ((mapx < 0 || mapx > map_width || mapy < 0 ||
-- mapy > map_height) ||
-- (map2x < 0 || map2x > map_width ||
-- map2y < 0 || map2y > map_height)) {
-- continue;
-- } else {
-- (*in_mapscale) = earthamapscales[x];
-- (*in_fetchscale) = x;
-- return 1;
-- }
-- }
--
-- return -1;
-- }
--
- // Mapblast style scale finding
- for (int x = 0; scales[x] != -1; x++) {
- calcxy(&mapx, &mapy, tlat, tlon, (double) scales[x]/PIXELFACT,
-@@ -2154,7 +2102,7 @@ void DrawNetBoundRects(vector<gps_network *> in_nets,
-
- // Thread function to compute a line of interpolated data
-
--typedef struct powerline_arg {
-+struct powerline_arg {
- // unsigned int y;
- // unsigned int y_max;
- unsigned int in_res;
-@@ -2397,8 +2345,8 @@ void DrawNetPower(vector<gps_network *> in_nets, Image
- delete[] power_map;
- delete[] power_input_map;
- delete[] colormap;
-- delete point_template;
-- delete rect_template;
-+ delete[] point_template;
-+ delete[] rect_template;
- }
-
- void DrawNetCenterDot(vector<gps_network *> in_nets, Image *in_img, DrawInfo *in_di) {
-@@ -4016,30 +3964,6 @@ int main(int argc, char *argv[]) {
- // Some day this needs to get rewritten to not be using a source that doesn't
- // work anymore as the internal reference point.
-
-- if (((mapsource == MAPSOURCE_TERRA) ||
-- (mapsource == MAPSOURCE_TERRATOPO)) && user_scale != 0) {
-- // It's way too much of a kludge to muck with munging the scale around
-- if ((user_scale < 10) || (user_scale > 16)) {
-- fprintf(stderr, "FATAL: You must provide a scale with the -s "
-- "option that is from 10 to 16\n");
-- exit(0);
-- }
-- fetch_scale = user_scale;
-- map_scale = user_scale = terrascales[(user_scale - 10)];
-- }
--
-- // Require the user to specify a scale between 2 and 15, then set
-- // {map,user}_scale to the cooresponding element in earthamapscales[].
-- if (mapsource == MAPSOURCE_EARTHAMAPS && user_scale != 0) {
-- if ((user_scale < 2) || (user_scale > 15)) {
-- fprintf(stderr, "FATAL: You must provide a scale with the -s "
-- "option that is from 2 to 15\n");
-- exit(0);
-- }
-- fetch_scale = user_scale;
-- map_scale = user_scale = earthamapscales[user_scale];
-- }
--
- if (ap_manuf_name != NULL) {
- char pathname[1024];
-
-@@ -4181,8 +4105,9 @@ int main(int argc, char *argv[]) {
- }
-
- if (!usermap) {
-- snprintf(mapname, 1024, "map_%f_%f_%ld_%d_%d.gif", map_avg_lat,
-- map_avg_lon, map_scale, map_width, map_height);
-+ snprintf(mapname, 1024, "map_%f_%f_%ld_%d_%d.%s", map_avg_lat,
-+ map_avg_lon, map_scale, map_width, map_height,
-+ mapsource == MAPSOURCE_OSM ? "png" : "gif");
- }
-
- if (useroutmap == false)
-@@ -4227,7 +4152,10 @@ int main(int argc, char *argv[]) {
- exit(1);
- }
-
-- if (mapsource == MAPSOURCE_MAPPOINT) {
-+ if (mapsource == MAPSOURCE_MAPPOINT
-+ || mapsource == MAPSOURCE_TERRA
-+ || mapsource == MAPSOURCE_EARTHAMAPS
-+ || mapsource == MAPSOURCE_TERRATOPO) {
- fprintf(stderr, "The source you selected is known to be broken. "
- "Support remains for this source only if previously "
- "downloaded maps are available, because the map vendor has "
-@@ -4242,18 +4170,9 @@ int main(int argc, char *argv[]) {
- snprintf(url, 1024, url_template_mb, map_avg_lat, map_avg_lon,
- map_scale, map_width, map_height,
- metric ? "&DU=KM" : "");
-- } else if (mapsource == MAPSOURCE_TERRA) {
-- snprintf(url, 1024, url_template_ts, map_avg_lat, map_avg_lon,
-- fetch_scale, map_width, map_height);
-- } else if (mapsource == MAPSOURCE_TERRATOPO) {
-- snprintf(url, 1024, url_template_tt, map_avg_lat, map_avg_lon,
-- fetch_scale, map_width, map_height);
- } else if (mapsource == MAPSOURCE_TIGER) {
- snprintf(url, 1024, url_template_ti, map_avg_lat, map_avg_lon,
- (map_scale / 300000.0), map_width, map_height);
-- } else if (mapsource == MAPSOURCE_EARTHAMAPS) {
-- snprintf(url, 1024, url_template_em, mapname, map_avg_lat,
-- map_avg_lon, map_width, map_height, fetch_scale);
- } else if (mapsource == MAPSOURCE_EUEX) {
- fetch_scale = (long) (map_scale / 3950);
- char loc[8] = "USA0409";
-@@ -4294,24 +4213,16 @@ int main(int argc, char *argv[]) {
- printf("Map url: %s\n", url);
- printf("Fetching map...\n");
-
-- if (mapsource == MAPSOURCE_EARTHAMAPS) {
-- int retval = system(url);
-+ char geturl[1024];
-+ snprintf(geturl, 1024, download_template, mapname, url);
-+ if (system(geturl)!=0) {
-+ fprintf(stderr, "WARNING: failed to execute '%s'\n", geturl);
-+ exit(1);
-+ }
-
-- if (retval != 0) {
-- fprintf(stderr, "Could not run %s: %s\n", url, strerror(retval));
-- exit(1);
-- }
-- } else {
-- char geturl[1024];
-- snprintf(geturl, 1024, download_template, url, mapname);
-- if (system(geturl)!=0) {
-- fprintf(stderr, "WARNING: failed to execute '%s'\n", geturl);
-- exit(1);
-- }
-- }
--
- printf("Loading map into Imagemagick structures.\n");
- strcpy(img_info->filename, mapname);
-+ ClearMagickException(&im_exception);
- img = ReadImage(img_info, &im_exception);
-
- if (img == (Image *) NULL) {
Index: patches/patch-kis_panel_widgets_cc
===================================================================
RCS file: patches/patch-kis_panel_widgets_cc
diff -N patches/patch-kis_panel_widgets_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-kis_panel_widgets_cc 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+explicitly cast
+
+Index: kis_panel_widgets.cc
+--- kis_panel_widgets.cc.orig
++++ kis_panel_widgets.cc
+@@ -2582,7 +2582,7 @@ int Kis_Single_Input::KeyPress(int in_key) {
+ // and if we have room, insert it and scroll to the right
+ if ((int) text.length() < max_len &&
+ filter_map.find(in_key) != filter_map.end()) {
+- char ins[2] = { in_key, 0 };
++ char ins[2] = { (char)in_key, 0 };
+ text.insert(inp_pos, ins);
+ inp_pos++;
+
Index: patches/patch-kismet_server_cc
===================================================================
RCS file: patches/patch-kismet_server_cc
diff -N patches/patch-kismet_server_cc
--- patches/patch-kismet_server_cc 17 May 2017 16:03:32 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,77 +0,0 @@
-$OpenBSD: patch-kismet_server_cc,v 1.3 2017/05/17 16:03:32 espie Exp $
-
-Index: kismet_server.cc
---- kismet_server.cc.orig
-+++ kismet_server.cc
-@@ -114,7 +114,7 @@ FifoDumpFile fifodump;
- TcpServer ui_server;
- int sound = -1;
- packet_info last_info;
--int decay;
-+int rdecay;
- channel_power channel_graph[CHANNEL_MAX];
- char *servername = NULL;
-
-@@ -172,7 +172,7 @@ int filter_export_bssid_invert = -1, filter_export_sou
- filter_export_dest_invert = -1;
-
- // For alert enabling...
--typedef struct _alert_enable {
-+struct _alert_enable {
- string alert_name;
- alert_time_unit limit_unit;
- alert_time_unit burst_unit;
-@@ -229,7 +229,7 @@ int retain_monitor;
- int netcryptdetect = 0;
-
- // Shutdown/restore networkmanager (if we can)
--int networkmanager_control(char *cmd) {
-+int networkmanager_control(const char *cmd) {
- #ifdef HAVE_DBUS
- DBusMessage* msg;
- DBusConnection* conn;
-@@ -759,7 +759,7 @@ void NetWriteInfo() {
- snprintf(tmpstr, 32, "%d", tracker.FetchNumPackets() - last_packnum);
- idata.rate = tmpstr;
-
-- if (time(0) - last_info.ts.tv_sec < decay && last_info.signal != -1)
-+ if (time(0) - last_info.ts.tv_sec < rdecay && last_info.signal != -1)
- snprintf(tmpstr, 16, "%d %d" , last_info.signal, last_info.noise);
- else if (last_info.quality == -1)
- snprintf(tmpstr, 16, "-1 -1");
-@@ -1543,7 +1543,7 @@ int ProcessBulkConf(ConfigFile *conf) {
- }
-
- if (conf->FetchOpt("decay") != "") {
-- if (sscanf(conf->FetchOpt("decay").c_str(), "%d", &decay) != 1) {
-+ if (sscanf(conf->FetchOpt("decay").c_str(), "%d", &rdecay) != 1) {
- fprintf(stderr, "FATAL: Illegal config file value for decay.\n");
- ErrorShutdown();
- }
-@@ -2237,7 +2237,7 @@ int main(int argc,char *argv[]) {
- { 0, 0, 0, 0 }
- };
- int option_index;
-- decay = 5;
-+ rdecay = 5;
-
- // Catch the interrupt handler to shut down
- signal(SIGINT, CatchShutdown);
-@@ -2950,7 +2950,7 @@ int main(int argc,char *argv[]) {
- timetracker.RegisterTimer(datainterval * SERVER_TIMESLICES_SEC, NULL, 1, &ExportSyncEvent, NULL);
- // Write waypoints if requested
- if (waypoint)
-- timetracker.RegisterTimer(decay * SERVER_TIMESLICES_SEC, NULL, 1, &WaypointSyncEvent, NULL);
-+ timetracker.RegisterTimer(rdecay * SERVER_TIMESLICES_SEC, NULL, 1, &WaypointSyncEvent, NULL);
- // Channel hop if requested
- if (channel_hop) {
- if (channel_dwell)
-@@ -3175,7 +3175,7 @@ daemon_parent_cleanup:
- num_networks = tracker.FetchNumNetworks();
-
- if (tracker.FetchNumPackets() != num_packets) {
-- if (cur_time - last_click >= decay && sound == 1) {
-+ if (cur_time - last_click >= rdecay && sound == 1) {
- if (tracker.FetchNumPackets() - num_packets >
- tracker.FetchNumDropped() + localdropnum - num_dropped) {
- sound = PlaySound("traffic");
Index: patches/patch-macaddr_h
===================================================================
RCS file: /cvs/ports/net/kismet/patches/patch-macaddr_h,v
retrieving revision 1.3
diff -u -r1.3 patch-macaddr_h
--- patches/patch-macaddr_h 17 May 2017 16:03:32 -0000 1.3
+++ patches/patch-macaddr_h 30 Jan 2019 21:54:27 -0000
@@ -1,46 +1,16 @@
-$OpenBSD: patch-macaddr_h,v 1.3 2017/05/17 16:03:32 espie Exp $
+$OpenBSD$
+
+silence clan warning

Index: macaddr.h
--- macaddr.h.orig
+++ macaddr.h
-@@ -22,6 +22,7 @@
- #include "config.h"
-
- #include <stdio.h>
-+#include <stdlib.h>
- #include <ctype.h>
- #include <sys/time.h>
- #include <sys/resource.h>
-@@ -46,7 +47,7 @@
- #define MAC_STR_LEN ((MAC_LEN * 2) + 6)
-
- // A packet MAC address
--typedef struct mac_addr {
-+struct mac_addr {
- uint64_t longmac;
- uint64_t longmask;
- int error;
-@@ -73,7 +74,7 @@ typedef struct mac_addr {
- longmac |= (uint64_t) bs_in[5] << ((MAC_LEN - 5 - 1) * 8);
-
- // If it has a mask component, get that
-- char *in_mask = strchr(in, '/');
-+ const char *in_mask = strchr(in, '/');
- if (in_mask != NULL) {
- longmask = 0;
-
-@@ -277,12 +278,12 @@ typedef struct mac_addr {
- template<class T>
- class macmap {
- protected:
-- typedef struct mask_vec_content {
-+ struct mask_vec_content {
- mac_addr mac;
- T value;
- };
+@@ -185,7 +185,7 @@ struct mac_addr {
+ }

-- typedef struct mask_vec_offsets {
-+ struct mask_vec_offsets {
- unsigned int first;
- unsigned int last;
- };
+ inline mac_addr(int in) {
+- in = in; // Silence gcc
++ static_cast<void>(in);
+ longmac = 0;
+ longmask = 0;
+ error = 0;
Index: patches/patch-man_gpsmap_1
===================================================================
RCS file: patches/patch-man_gpsmap_1
diff -N patches/patch-man_gpsmap_1
--- patches/patch-man_gpsmap_1 27 Jun 2008 22:10:14 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-man_gpsmap_1,v 1.3 2008/06/27 22:10:14 kili Exp $
-
---- man/gpsmap.1.orig Thu Apr 1 00:15:23 2004
-+++ man/gpsmap.1 Sat Jun 21 18:26:10 2008
-@@ -67,7 +67,10 @@ sample points.
- .TP
- .B
- \fB-S\fP, \fB--map-source\fP SOURCE
--Source to download maps from (-1 = Null; 0 = Mapblast; 1 = MapPoint(broken); 2 = Terraserver; 3 = Tiger Census; 4 = Earthamap; 5 = Terraserver Topographic). Default: 4
-+Source to download maps from (-1 = Null; 0 = Mapblast; 1 = MapPoint(broken);
-+2 = Terraserver(broken); 3 = Tiger Census; 4 = Earthamap(broken);
-+5 = Terraserver Topographic(broken); 6 = Expedia; 7 = OpenStreetMap).
-+Default: -1.
- .TP
- .B
- \fB-D\fP, \fB--keep-gif\fP
Index: patches/patch-man_kismet_drone_conf_5
===================================================================
RCS file: patches/patch-man_kismet_drone_conf_5
diff -N patches/patch-man_kismet_drone_conf_5
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-man_kismet_drone_conf_5 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: man/kismet_drone.conf.5
+--- man/kismet_drone.conf.5.orig
++++ man/kismet_drone.conf.5
+@@ -6,7 +6,7 @@
+ .SH DESCRIPTION
+ kismet_drone uses a minimalized configuration file, similar in options to the
+ main kismet server configuration file. By default, the drone config is in
+-/usr/local/etc/kismet.conf. A default configuration is included with Kismet but
++${SYSCONFDIR}/kismet/kismet.conf. A default configuration is included with Kismet but
+ it is likely you will need to modify it to suit your hardware and preferences.
+ .SH CONFIGURATION FILE FORMAT
+ All entries are of the format directive = value
Index: patches/patch-netracker_h
===================================================================
RCS file: patches/patch-netracker_h
diff -N patches/patch-netracker_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-netracker_h 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+
+it's forward declared twice
+
+Index: netracker.h
+--- netracker.h.orig
++++ netracker.h
+@@ -306,9 +306,6 @@ class Netracker { (public)
+ int dirty;
+ };
+
+- // Fwd def for our map
+- class tracked_client;
+-
+ class ssid_alert_data {
+ public:
+ ssid_alert_data() {
Index: patches/patch-packet_h
===================================================================
RCS file: patches/patch-packet_h
diff -N patches/patch-packet_h
--- patches/patch-packet_h 17 May 2017 16:03:32 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-packet_h,v 1.3 2017/05/17 16:03:32 espie Exp $
-
-Index: packet.h
---- packet.h.orig
-+++ packet.h
-@@ -54,7 +54,7 @@
- #define MAC_STR_LEN ((MAC_LEN * 2) + 6)
-
- // Parmeters to the packet info
--typedef struct packet_parm {
-+struct packet_parm {
- int fuzzy_crypt;
- int fuzzy_decode;
- };
-@@ -295,7 +295,7 @@ typedef struct {
- } cdp_proto_element;
-
- // Info about a protocol
--typedef struct proto_info {
-+struct proto_info {
- protocol_info_type type;
-
- uint8_t source_ip[4];
Index: patches/patch-packetracker_cc
===================================================================
RCS file: patches/patch-packetracker_cc
diff -N patches/patch-packetracker_cc
--- patches/patch-packetracker_cc 17 May 2017 16:03:32 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,70 +0,0 @@
-$OpenBSD: patch-packetracker_cc,v 1.3 2017/05/17 16:03:32 espie Exp $
-
-Index: packetracker.cc
---- packetracker.cc.orig
-+++ packetracker.cc
-@@ -1194,7 +1194,7 @@ void Packetracker::ProcessDataPacket(kis_packet *packe
- }
-
- unsigned int ipdata_dirty = 0;
-- char *means = NULL;
-+ const char *means = NULL;
-
- if (info->proto.type == proto_dhcp_server &&
- (client->ipdata.atype < address_dhcp ||
-@@ -1294,7 +1294,7 @@ void Packetracker::ProcessDataPacket(kis_packet *packe
- // Handle netstumbler packets
-
- if (alertracker->PotentialAlert(arefs[NETSTUMBLER_AREF]) > 0) {
-- char *nsversion;
-+ const char *nsversion;
-
- switch (info->proto.prototype_extra) {
- case 22:
-@@ -1320,8 +1320,8 @@ void Packetracker::ProcessDataPacket(kis_packet *packe
- info->proto.type == proto_ttls || info->proto.type == proto_tls) {
- // Handle EAP packets
-
-- char *eapcode;
-- char *eaptype;
-+ const char *eapcode;
-+ const char *eaptype;
-
- switch (info->proto.prototype_extra) {
- case EAP_CODE_REQUEST:
-@@ -1373,7 +1373,7 @@ void Packetracker::ProcessDataPacket(kis_packet *packe
- } else if (info->proto.type == proto_isakmp) {
- // Handle ISAKMP traffic
-
-- char *isakmpcode;
-+ const char *isakmpcode;
- switch (info->proto.prototype_extra) {
- case ISAKMP_EXCH_NONE:
- isakmpcode = "NONE";
-@@ -2394,7 +2394,7 @@ int Packetracker::WriteXMLNetworks(string in_fname) {
- }
-
- if (net->ipdata.atype > address_factory) {
-- char *addrtype;
-+ const char *addrtype;
- switch (net->ipdata.atype) {
- case address_dhcp:
- addrtype = "dhcp";
-@@ -2425,7 +2425,7 @@ int Packetracker::WriteXMLNetworks(string in_fname) {
- for (unsigned int cltr = 0; cltr < net->client_vec.size(); cltr++) {
- wireless_client *cli = net->client_vec[cltr];
-
-- char *clitype;
-+ const char *clitype;
- switch (cli->type) {
- case client_fromds:
- clitype = "fromds";
-@@ -2527,7 +2527,7 @@ int Packetracker::WriteXMLNetworks(string in_fname) {
-
-
- if (cli->ipdata.atype > address_factory) {
-- char *addrtype;
-+ const char *addrtype;
- switch (cli->ipdata.atype) {
- case address_dhcp:
- addrtype = "dhcp";
Index: patches/patch-packetsource_bsdrt_cc
===================================================================
RCS file: patches/patch-packetsource_bsdrt_cc
diff -N patches/patch-packetsource_bsdrt_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-packetsource_bsdrt_cc 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,39 @@
+$OpenBSD$
+
+
+IFM_MAKEMODE is not defined on OpenBSD, just copying it from Linux
+doesn't help, since our IFM_MSHIFT etc. operate on ULL, but mode
+apparently only is of type int
+
+Index: packetsource_bsdrt.cc
+--- packetsource_bsdrt.cc.orig
++++ packetsource_bsdrt.cc
+@@ -138,7 +138,7 @@ int Radiotap_BSD_Controller::GetMediaOpt(int& options,
+ int Radiotap_BSD_Controller::SetMediaOpt(int options, int mode) {
+ struct ifmediareq ifmr;
+ struct ifreq ifr;
+- int *mwords;
++ uint64_t *mwords;
+
+ if (CheckSocket() == 0)
+ return 0;
+@@ -160,7 +160,7 @@ int Radiotap_BSD_Controller::SetMediaOpt(int options,
+ return 0;
+ }
+
+- mwords = new int[ifmr.ifm_count];
++ mwords = new uint64_t[ifmr.ifm_count];
+ if (mwords == NULL) {
+ _MSG("BSD interface control cannot malloc interface array, out of "
+ "memory or other badness.", MSGFLAG_PRINTERROR);
+@@ -179,6 +179,10 @@ int Radiotap_BSD_Controller::SetMediaOpt(int options,
+ memset(&ifr, 0, sizeof(ifr));
+ strncpy(ifr.ifr_name, dev.c_str(), sizeof(ifr.ifr_name));
+ ifr.ifr_media = (ifmr.ifm_current &~ IFM_OMASK) | options;
++#ifndef IFM_MAKEMODE
++#define IFM_MAKEMODE(mode) \
++ ((((unsigned long long)mode) << IFM_MSHIFT) & IFM_MMASK)
++#endif
+ ifr.ifr_media = (ifr.ifr_media &~ IFM_MMASK) | IFM_MAKEMODE(mode);
+
+ if (ioctl(sock, SIOCSIFMEDIA, (caddr_t) &ifr) < 0) {
Index: patches/patch-packetsource_pcap_cc
===================================================================
RCS file: patches/patch-packetsource_pcap_cc
diff -N patches/patch-packetsource_pcap_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-packetsource_pcap_cc 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Index: packetsource_pcap.cc
+--- packetsource_pcap.cc.orig
++++ packetsource_pcap.cc
+@@ -60,6 +60,10 @@ extern "C" {
+ #include <netinet/if_ether.h>
+ #include <dev/ic/if_wi_ieee.h>
+
++#ifndef IEEE80211_CHAN_TURBO
++#define IEEE80211_CHAN_TURBO 0x0010
++#endif
++
+ #ifdef HAVE_RADIOTAP
+ #include <net80211/ieee80211.h>
+ #include <net80211/ieee80211_ioctl.h>
Index: patches/patch-packetstream_h
===================================================================
RCS file: patches/patch-packetstream_h
diff -N patches/patch-packetstream_h
--- patches/patch-packetstream_h 17 May 2017 16:03:32 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-$OpenBSD: patch-packetstream_h,v 1.3 2017/05/17 16:03:32 espie Exp $
-
-Index: packetstream.h
---- packetstream.h.orig
-+++ packetstream.h
-@@ -37,18 +37,18 @@
-
- #define STREAM_COMMAND_FLUSH -1
-
--typedef struct stream_frame_header {
-+struct stream_frame_header {
- uint32_t frame_sentinel;
- uint8_t frame_type;
- uint32_t frame_len;
- } __attribute__((__packed__));
-
--typedef struct stream_version_packet {
-+struct stream_version_packet {
- uint16_t drone_version;
- uint8_t gps_enabled;
- };
-
--typedef struct stream_packet_header {
-+struct stream_packet_header {
- uint32_t header_len;
- uint16_t drone_version;
- uint32_t len;
Index: patches/patch-panelfront_cc
===================================================================
RCS file: patches/patch-panelfront_cc
diff -N patches/patch-panelfront_cc
--- patches/patch-panelfront_cc 17 May 2017 16:03:32 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,176 +0,0 @@
-$OpenBSD: patch-panelfront_cc,v 1.6 2017/05/17 16:03:32 espie Exp $
-
-Index: panelfront.cc
---- panelfront.cc.orig
-+++ panelfront.cc
-@@ -54,7 +54,7 @@
-
- #if (defined(HAVE_LIBNCURSES) && defined(HAVE_LIBPANEL) && defined(BUILD_PANEL))
-
--char *KismetHelpText[] = {
-+const char *KismetHelpText[] = {
- "KISMET PANELS INTERFACE",
- "QUICK REFERENCE",
- " Key Action",
-@@ -138,7 +138,7 @@ char *KismetHelpText[] = {
-
-
- // Narrow text
--char *KismetHelpTextNarrow[] = {
-+const char *KismetHelpTextNarrow[] = {
- "KISMET PANELS INTERFACE",
- "KISMET NETWORK PANEL",
- "Key Action",
-@@ -171,7 +171,7 @@ char *KismetHelpTextNarrow[] = {
- };
-
-
--char *KismetHelpDetails[] = {
-+const char *KismetHelpDetails[] = {
- "NETWORK DETAILS",
- "This panel lists in depth information about",
- "the selected network or group, which may or",
-@@ -188,7 +188,7 @@ char *KismetHelpDetails[] = {
- };
-
-
--char *KismetSortText[] = {
-+const char *KismetSortText[] = {
- "Key Sort Key Sort",
- " a Auto-fit (standard) c Channel",
- " f First time seen F First time seen (descending)",
-@@ -202,7 +202,7 @@ char *KismetSortText[] = {
- };
-
-
--char *KismetSortTextNarrow[] = {
-+const char *KismetSortTextNarrow[] = {
- "Key Sort Key Sort",
- " a Auto-fit c Channel",
- " f First time F First time (d)",
-@@ -215,7 +215,7 @@ char *KismetSortTextNarrow[] = {
- NULL
- };
-
--char *KismetClientSortText[] = {
-+const char *KismetClientSortText[] = {
- "Key Sort Key Sort",
- " a Auto-fit (standard) c Channel",
- " f First time seen F First time seen (descending)",
-@@ -227,7 +227,7 @@ char *KismetClientSortText[] = {
- NULL
- };
-
--char *KismetClientSortTextNarrow[] = {
-+const char *KismetClientSortTextNarrow[] = {
- "Key Sort Key Sort",
- " a Auto-fit c Channel",
- " f First time F First time (d)",
-@@ -239,7 +239,7 @@ char *KismetClientSortTextNarrow[] = {
- NULL
- };
-
--char *KismetHelpPower[] = {
-+const char *KismetHelpPower[] = {
- "KISMET POWER",
- "This panel lists the overall signal (S) and "
- "noise (N) levels reported by the wireless card, if",
-@@ -250,7 +250,7 @@ char *KismetHelpPower[] = {
- };
-
-
--char *KismetHelpRate[] = {
-+const char *KismetHelpRate[] = {
- "KISMET PACKET RATE",
- "This panel displays a moving graph of the rate at which",
- "packets are seen. The graph covers the last 5 minutes.",
-@@ -260,7 +260,7 @@ char *KismetHelpRate[] = {
- };
-
-
--char *KismetHelpGps[] = {
-+const char *KismetHelpGps[] = {
- "KISMET NETWORK FOLLOW",
- "This panel estimates the center of a network, the current",
- "direction of travel, and the direction of the network center",
-@@ -273,7 +273,7 @@ char *KismetHelpGps[] = {
- };
-
-
--char *KismetHelpStats[] = {
-+const char *KismetHelpStats[] = {
- "KISMET NETWORK STATISTICS",
- "This panel displays overall statistics about the wireless",
- "networks seen, including how many are encrypted with WEP",
-@@ -286,7 +286,7 @@ char *KismetHelpStats[] = {
- };
-
-
--char *KismetHelpDump[] = {
-+const char *KismetHelpDump[] = {
- "KISMET STRING DUMP",
- "This panel displays printable strings from uencrypted data",
- "packets. This is basially equivalent to the 'strings' command",
-@@ -302,7 +302,7 @@ char *KismetHelpDump[] = {
- };
-
-
--char *KismetHelpPack[] = {
-+const char *KismetHelpPack[] = {
- "KISMET PACKET DUMP",
- "This panel displays information about the packet types seen.",
- "It is divided into 2 segments - The upper quarter displays a",
-@@ -348,7 +348,7 @@ char *KismetHelpPack[] = {
- NULL
- };
-
--char *KismetHelpAlert[] = {
-+const char *KismetHelpAlert[] = {
- "KISMET ALERTS",
- "This panel tracks alert conditions, such as NetStumbler clients",
- "or DOS attacks.",
-@@ -358,7 +358,7 @@ char *KismetHelpAlert[] = {
- NULL
- };
-
--char *KismetClientHelpText[] = {
-+const char *KismetClientHelpText[] = {
- "KISMET CLIENT LIST",
- "QUICK REFERENCE",
- " Key Action",
-@@ -386,7 +386,7 @@ char *KismetClientHelpText[] = {
- NULL,
- };
-
--char *KismetClientHelpDetails[] = {
-+const char *KismetClientHelpDetails[] = {
- "CLIENT DETAILS",
- "This panel lists in depth information about",
- "the selected client, which may or may not be",
-@@ -400,7 +400,7 @@ char *KismetClientHelpDetails[] = {
- NULL
- };
-
--char *KismetHelpServer[] = {
-+const char *KismetHelpServer[] = {
- "KISMET SERVERS",
- " Key Action",
- " Up Scroll list up",
-@@ -423,7 +423,7 @@ char *KismetHelpServer[] = {
- NULL
- };
-
--char *KismetIntroText[] = {
-+const char *KismetIntroText[] = {
- "",
- "Welcome to the Kismet panels frontend.",
- "Context help is available for all displays, press 'H' at any time",
-@@ -1187,7 +1187,7 @@ PanelFront::kis_window *PanelFront::SpawnWindow(string
- }
-
- // Spawn a text helpbox with the included help stuff
--void PanelFront::SpawnHelp(char **in_helptext) {
-+void PanelFront::SpawnHelp(const char **in_helptext) {
- kis_window *kwin = new kis_window;
-
- // Fill in the window a bit
Index: patches/patch-panelfront_display_cc
===================================================================
RCS file: patches/patch-panelfront_display_cc
diff -N patches/patch-panelfront_display_cc
--- patches/patch-panelfront_display_cc 12 Apr 2018 17:55:08 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-panelfront_display_cc,v 1.3 2018/04/12 17:55:08 jasper Exp $
-
-Index: panelfront_display.cc
---- panelfront_display.cc.orig
-+++ panelfront_display.cc
-@@ -1712,7 +1712,7 @@ int PanelFront::DetailsPrinter(void *in_window) {
-
- // Added by Sven-Ola, may need le64_to_cpu()? Also added the bss_tsf
- // to the kismet tcp protocol used between client and server
-- snprintf(output, print_width, "BSS Time: %"PRIx64"", dnet->bss_timestamp);
-+ snprintf(output, print_width, "BSS Time: %" PRIx64 "", dnet->bss_timestamp);
- kwin->text.push_back(output);
-
- if (dnet->maxseenrate != 0) {
Index: patches/patch-panelfront_h
===================================================================
RCS file: patches/patch-panelfront_h
diff -N patches/patch-panelfront_h
--- patches/patch-panelfront_h 17 May 2017 16:03:32 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,88 +0,0 @@
-$OpenBSD: patch-panelfront_h,v 1.1 2017/05/17 16:03:32 espie Exp $
-
-Index: panelfront.h
---- panelfront.h.orig
-+++ panelfront.h
-@@ -58,28 +58,28 @@
- #define ACS_VLINE '|'
- #endif
-
--extern char *KismetHelpText[];
--extern char *KismetHelpTextNarrow[];
--extern char *KismetHelpDetails[];
--extern char *KismetSortText[];
--extern char *KismetSortTextNarrow[];
-+extern const char *KismetHelpText[];
-+extern const char *KismetHelpTextNarrow[];
-+extern const char *KismetHelpDetails[];
-+extern const char *KismetSortText[];
-+extern const char *KismetSortTextNarrow[];
- #define SORT_SIZE 10
--extern char *KismetHelpPower[];
--extern char *KismetHelpRate[];
--extern char *KismetHelpGps[];
--extern char *KismetHelpStats[];
--extern char *KismetHelpDump[];
--extern char *KismetHelpPack[];
--extern char *KismetHelpAlert[];
--extern char *KismetHelpServer[];
-+extern const char *KismetHelpPower[];
-+extern const char *KismetHelpRate[];
-+extern const char *KismetHelpGps[];
-+extern const char *KismetHelpStats[];
-+extern const char *KismetHelpDump[];
-+extern const char *KismetHelpPack[];
-+extern const char *KismetHelpAlert[];
-+extern const char *KismetHelpServer[];
-
--extern char *KismetClientHelpText[];
--extern char *KismetClientHelpDetails[];
--extern char *KismetClientSortText[];
--extern char *KismetClientSortTextNarrow[];
-+extern const char *KismetClientHelpText[];
-+extern const char *KismetClientHelpDetails[];
-+extern const char *KismetClientSortText[];
-+extern const char *KismetClientSortTextNarrow[];
- #define CLIENT_SORT_SIZE 8
-
--extern char *KismetIntroText[];
-+extern const char *KismetIntroText[];
-
- // These are in the kismet_curses.cc main code
- extern int sound;
-@@ -118,7 +118,7 @@ class PanelFront : public Frontend { (public)
- virtual int FetchDescriptor() { return fileno(stdin); };
- protected:
- // Curses color pair
-- typedef struct color_pair {
-+ struct color_pair {
- color_pair() { index = -1; pair = 0; bold = 0; }
-
- int index;
-@@ -178,7 +178,7 @@ class PanelFront : public Frontend { (public)
- list<kis_window *> window_list;
-
- // Server context records for multiple servers
-- typedef struct server_context {
-+ struct server_context {
- server_context() {
- client = NULL;
- quality = power = noise = 0;
-@@ -241,7 +241,7 @@ class PanelFront : public Frontend { (public)
- };
-
- // Context-aware cardinfo
-- typedef struct cardinfo_context {
-+ struct cardinfo_context {
- server_context *context;
- TcpClient::card_info *cardinfo;
- };
-@@ -318,7 +318,7 @@ class PanelFront : public Frontend { (public)
- key_handler in_input, int in_x = -1, int in_y = -1);
-
- // Spawn a help popup
-- void SpawnHelp(char **in_helptext);
-+ void SpawnHelp(const char **in_helptext);
-
- // Kill a window
- void DestroyWindow(kis_window *in_window);
Index: patches/patch-pcapsource_cc
===================================================================
RCS file: patches/patch-pcapsource_cc
diff -N patches/patch-pcapsource_cc
--- patches/patch-pcapsource_cc 11 Sep 2015 16:27:41 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
-$OpenBSD: patch-pcapsource_cc,v 1.5 2015/09/11 16:27:41 sthen Exp $
-
-The only media types used here are already shifted so using IFM_MAKEMODE
-here is wrong.
-
---- pcapsource.cc.orig Wed May 21 09:56:43 2008
-+++ pcapsource.cc Fri Sep 11 10:26:57 2015
-@@ -3068,7 +3068,7 @@ bool RadiotapBSD::getmediaopt(int& options, int& mode)
- bool RadiotapBSD::setmediaopt(int options, int mode) {
- struct ifmediareq ifmr;
- struct ifreq ifr;
-- int *mwords;
-+ uint64_t *mwords;
-
- if (!checksocket())
- return false;
-@@ -3089,7 +3089,7 @@ bool RadiotapBSD::setmediaopt(int options, int mode) {
- seterror("%s: no media types?", ifname.c_str());
- return false;
- }
-- mwords = new int[ifmr.ifm_count];
-+ mwords = new uint64_t[ifmr.ifm_count];
- if (mwords == NULL) {
- seterror("cannot malloc");
- return false;
-@@ -3104,7 +3104,7 @@ bool RadiotapBSD::setmediaopt(int options, int mode) {
- memset(&ifr, 0, sizeof(ifr));
- strncpy(ifr.ifr_name, ifname.c_str(), sizeof(ifr.ifr_name)-1);
- ifr.ifr_media = (ifmr.ifm_current &~ IFM_OMASK) | options;
-- ifr.ifr_media = (ifr.ifr_media &~ IFM_MMASK) | IFM_MAKEMODE(mode);
-+ ifr.ifr_media = (ifr.ifr_media &~ IFM_MMASK) | mode;
-
- if (ioctl(s, SIOCSIFMEDIA, (caddr_t)&ifr) < 0) {
- perror("cannot set ifmedia");
Index: patches/patch-server_protocols_cc
===================================================================
RCS file: patches/patch-server_protocols_cc
diff -N patches/patch-server_protocols_cc
--- patches/patch-server_protocols_cc 12 Apr 2018 17:55:08 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,141 +0,0 @@
-$OpenBSD: patch-server_protocols_cc,v 1.2 2018/04/12 17:55:08 jasper Exp $
-
-Index: server_protocols.cc
---- server_protocols.cc.orig
-+++ server_protocols.cc
-@@ -23,23 +23,23 @@
- #include "server_protocols.h"
- #include "server_globals.h"
-
--char *INFO_fields_text[] = {
-+const char *INFO_fields_text[] = {
- "networks", "packets", "crypt", "weak",
- "noise", "dropped", "rate", "signal",
- NULL
- };
-
--char *STATUS_fields_text[] = {
-+const char *STATUS_fields_text[] = {
- "text",
- NULL
- };
-
--char *ALERT_fields_text[] = {
-+const char *ALERT_fields_text[] = {
- "sec", "usec", "header", "bssid", "source", "dest", "other", "channel", "text",
- NULL
- };
-
--char *PACKET_fields_text[] = {
-+const char *PACKET_fields_text[] = {
- "type", "subtype", "timesec", "encrypted",
- "weak", "beaconrate", "sourcemac", "destmac",
- "bssid", "ssid", "prototype", "sourceip",
-@@ -48,52 +48,52 @@ char *PACKET_fields_text[] = {
- NULL
- };
-
--char *STRING_fields_text[] = {
-+const char *STRING_fields_text[] = {
- "bssid", "sourcemac", "text",
- NULL
- };
-
--char *CISCO_fields_text[] = {
-+const char *CISCO_fields_text[] = {
- "placeholder",
- NULL
- };
-
--char *KISMET_fields_text[] = {
-+const char *KISMET_fields_text[] = {
- "version", "starttime", "servername", "timestamp", "channelhop", "newversion",
- NULL
- };
-
--char *PROTOCOLS_fields_text[] = {
-+const char *PROTOCOLS_fields_text[] = {
- "protocols",
- NULL
- };
-
--char *CAPABILITY_fields_text[] = {
-+const char *CAPABILITY_fields_text[] = {
- "capabilities",
- NULL
- };
-
--char *TIME_fields_text[] = {
-+const char *TIME_fields_text[] = {
- "timesec",
- NULL
- };
-
--char *TERMINATE_fields_text[] = {
-+const char *TERMINATE_fields_text[] = {
- "text",
- NULL
- };
-
--char *GPS_fields_text[] = {
-+const char *GPS_fields_text[] = {
- "lat", "lon", "alt", "spd", "heading", "fix",
- NULL
- };
-
--char *REMOVE_fields_text[] = {
-+const char *REMOVE_fields_text[] = {
- "bssid",
- NULL
- };
-
--char *NETWORK_fields_text[] = {
-+const char *NETWORK_fields_text[] = {
- "bssid", "type", "ssid", "beaconinfo",
- "llcpackets", "datapackets", "cryptpackets",
- "weakpackets", "channel", "wep", "firsttime",
-@@ -114,7 +114,7 @@ char *NETWORK_fields_text[] = {
- NULL
- };
-
--char *CLIENT_fields_text[] = {
-+const char *CLIENT_fields_text[] = {
- "bssid", "mac", "type", "firsttime", "lasttime",
- "manufkey", "manufscore",
- "datapackets", "cryptpackets", "weakpackets",
-@@ -131,22 +131,22 @@ char *CLIENT_fields_text[] = {
- NULL
- };
-
--char *ERROR_fields_text[] = {
-+const char *ERROR_fields_text[] = {
- "text",
- NULL
- };
-
--char *ACK_fields_text[] = {
-+const char *ACK_fields_text[] = {
- "cmdnum",
- NULL
- };
-
--char *WEPKEY_fields_text[] = {
-+const char *WEPKEY_fields_text[] = {
- "origin", "bssid", "key", "encrypted", "failed",
- NULL
- };
-
--char *CARD_fields_text[] = {
-+const char *CARD_fields_text[] = {
- "interface", "type", "username", "channel", "id", "packets", "hopping",
- NULL
- };
-@@ -523,7 +523,7 @@ void Protocol_Network2Data(const wireless_network *net
- snprintf(tmpstr, 128, "%d", net->dupeiv_packets);
- data->ndvec.push_back(tmpstr);
-
-- snprintf(tmpstr, 128, "%"PRId64"", net->bss_timestamp);
-+ snprintf(tmpstr, 128, "%" PRId64 "", net->bss_timestamp);
- data->ndvec.push_back(tmpstr);
-
- }
Index: patches/patch-server_protocols_h
===================================================================
RCS file: patches/patch-server_protocols_h
diff -N patches/patch-server_protocols_h
--- patches/patch-server_protocols_h 17 May 2017 16:03:32 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,98 +0,0 @@
-$OpenBSD: patch-server_protocols_h,v 1.1 2017/05/17 16:03:32 espie Exp $
-
-Index: server_protocols.h
---- server_protocols.h.orig
-+++ server_protocols.h
-@@ -139,25 +139,25 @@ enum CARD_fields {
- };
-
- // Builtin client/server field contents
--extern char *KISMET_fields_text[];
--extern char *CAPABILITY_fields_text[];
--extern char *PROTOCOLS_fields_text[];
--extern char *ERROR_fields_text[];
--extern char *NETWORK_fields_text[];
--extern char *CLIENT_fields_text[];
--extern char *GPS_fields_text[];
--extern char *TIME_fields_text[];
--extern char *INFO_fields_text[];
--extern char *REMOVE_fields_text[];
--extern char *STATUS_fields_text[];
--extern char *ALERT_fields_text[];
--extern char *ACK_fields_text[];
--extern char *PACKET_fields_text[];
--extern char *STRING_fields_text[];
--extern char *TERMINATE_fields_text[];
--extern char *CISCO_fields_text[];
--extern char *WEPKEY_fields_text[];
--extern char *CARD_fields_text[];
-+extern const char *KISMET_fields_text[];
-+extern const char *CAPABILITY_fields_text[];
-+extern const char *PROTOCOLS_fields_text[];
-+extern const char *ERROR_fields_text[];
-+extern const char *NETWORK_fields_text[];
-+extern const char *CLIENT_fields_text[];
-+extern const char *GPS_fields_text[];
-+extern const char *TIME_fields_text[];
-+extern const char *INFO_fields_text[];
-+extern const char *REMOVE_fields_text[];
-+extern const char *STATUS_fields_text[];
-+extern const char *ALERT_fields_text[];
-+extern const char *ACK_fields_text[];
-+extern const char *PACKET_fields_text[];
-+extern const char *STRING_fields_text[];
-+extern const char *TERMINATE_fields_text[];
-+extern const char *CISCO_fields_text[];
-+extern const char *WEPKEY_fields_text[];
-+extern const char *CARD_fields_text[];
-
- // Client/server protocol data structures. These get passed as void *'s to each of the
- // protocol functions.
-@@ -165,7 +165,7 @@ extern char *CARD_fields_text[];
- // same order as the field names. For shorter ones, the code is a lot more maintainable
- // to have named vars, for longer ones it just makes sense to use a big ordered vector
-
--typedef struct KISMET_data {
-+struct KISMET_data {
- string version;
- string starttime;
- string servername;
-@@ -173,31 +173,31 @@ typedef struct KISMET_data {
- string newversion;
- };
-
--typedef struct GPS_data {
-+struct GPS_data {
- string lat, lon, alt, spd, heading, mode;
- };
-
--typedef struct INFO_data {
-+struct INFO_data {
- string networks, packets, crypt, weak, noise, dropped, rate, signal;
- };
-
--typedef struct NETWORK_data {
-+struct NETWORK_data {
- vector<string> ndvec;
- };
-
--typedef struct CLIENT_data {
-+struct CLIENT_data {
- vector<string> cdvec;
- };
-
--typedef struct ALERT_data {
-+struct ALERT_data {
- string header, sec, usec, bssid, source, dest, other, channel, text;
- };
-
--typedef struct PACKET_data {
-+struct PACKET_data {
- vector<string> pdvec;
- };
-
--typedef struct STRING_data {
-+struct STRING_data {
- string bssid, sourcemac, text;
- };
-
Index: patches/patch-tcpclient_cc
===================================================================
RCS file: /cvs/ports/net/kismet/patches/patch-tcpclient_cc,v
retrieving revision 1.3
diff -u -r1.3 patch-tcpclient_cc
--- patches/patch-tcpclient_cc 12 Apr 2018 17:55:08 -0000 1.3
+++ patches/patch-tcpclient_cc 30 Jan 2019 21:54:27 -0000
@@ -1,23 +1,23 @@
-$OpenBSD: patch-tcpclient_cc,v 1.3 2018/04/12 17:55:08 jasper Exp $
+$OpenBSD$

Index: tcpclient.cc
--- tcpclient.cc.orig
+++ tcpclient.cc
-@@ -129,7 +129,7 @@ int TcpClient::Connect(short int in_port, char *in_hos
+@@ -75,7 +75,7 @@ int TcpClient::Connect(const char *in_remotehost, shor
local_sock.sin_addr.s_addr = htonl(INADDR_ANY);
local_sock.sin_port = htons(0);

-- if (bind(client_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
-+ if (::bind(client_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
- snprintf(errstr, 1024, "FATAL: TcpClient bind() failed %d (%s)\n",
- errno, strerror(errno));
- return (-3);
-@@ -408,7 +408,7 @@ int TcpClient::ParseData(char *in_data) {
- "%d %d %d %d %d %d %d %d %d %hd.%hd.%hd.%hd "
- "%d %f %f %f %f %f %f %f %f %d %d %d %f %d %d %d %d %d %d %d %d"
- "%f %f %f %lf %lf %lf %ld %ld"
-- "%d %d %d %d %d %d %d %d %"PRId64"",
-+ "%d %d %d %d %d %d %d %d %" PRId64 "",
- &tmptype, ssid, beaconstr,
- &llc_packets, &data_packets, &crypt_packets,
- &interesting_packets, &channel, &crypt_set,
+- if (bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
++ if (::bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
+ snprintf(errstr, 1024, "TCP client bind() failed: %s", strerror(errno));
+ globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR);
+ close(cli_fd);
+@@ -170,7 +170,7 @@ int TcpClient::ConnectSync(const char *in_remotehost,
+ local_sock.sin_addr.s_addr = htonl(INADDR_ANY);
+ local_sock.sin_port = htons(0);
+
+- if (bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
++ if (::bind(cli_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
+ snprintf(errstr, 1024, "TCP client bind() failed: %s", strerror(errno));
+ globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR);
+ close(cli_fd);
Index: patches/patch-tcpclient_h
===================================================================
RCS file: patches/patch-tcpclient_h
diff -N patches/patch-tcpclient_h
--- patches/patch-tcpclient_h 17 May 2017 16:03:32 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-$OpenBSD: patch-tcpclient_h,v 1.1 2017/05/17 16:03:32 espie Exp $
-
-Index: tcpclient.h
---- tcpclient.h.orig
-+++ tcpclient.h
-@@ -62,7 +62,7 @@ class TcpClient;
-
- class TcpClient {
- public:
-- typedef struct alert_info {
-+ struct alert_info {
- timeval alert_ts;
- string alert_text;
- };
-@@ -78,7 +78,7 @@ class TcpClient { (public)
- }
- };
-
-- typedef struct string_info {
-+ struct string_info {
- mac_addr bssid;
- mac_addr source;
- timeval string_ts;
-@@ -96,7 +96,7 @@ class TcpClient { (public)
- }
- };
-
-- typedef struct card_info {
-+ struct card_info {
- string interface;
- string type;
- string username;
Index: patches/patch-tcpserver_cc
===================================================================
RCS file: /cvs/ports/net/kismet/patches/patch-tcpserver_cc,v
retrieving revision 1.4
diff -u -r1.4 patch-tcpserver_cc
--- patches/patch-tcpserver_cc 12 Apr 2018 17:55:08 -0000 1.4
+++ patches/patch-tcpserver_cc 30 Jan 2019 21:54:27 -0000
@@ -1,23 +1,14 @@
-$OpenBSD: patch-tcpserver_cc,v 1.4 2018/04/12 17:55:08 jasper Exp $
+$OpenBSD$

Index: tcpserver.cc
--- tcpserver.cc.orig
+++ tcpserver.cc
-@@ -86,7 +86,7 @@ int TcpServer::Setup(unsigned int in_max_clients, stri
+@@ -84,7 +84,7 @@ int TcpServer::EnableServer() {
+ }

- // Bind the named socket
- // Debug("Server::Setup calling bind()");
+ // Bind the socket
- if (bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
+ if (::bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
- snprintf(errstr, 1024, "TcpServer bind() failed: %s", strerror(errno));
- return (-5);
- }
-@@ -567,7 +567,7 @@ int TcpServer::SendMainProtocols(int in_fd, int in_ref
- return SendToClient(in_fd, in_ref, (void *) &protocol_map);
- }
-
--int TcpServer::RegisterProtocol(string in_header, int in_required, char **in_fields,
-+int TcpServer::RegisterProtocol(string in_header, int in_required, const char **in_fields,
- int (*in_printer)(PROTO_PARMS),
- void (*in_enable)(int)) {
- // First, see if we're already registered and return a -1 if we are. You can't
+ snprintf(errstr, STATUS_MAX, "TCP server bind() failed: %s",
+ strerror(errno));
+ globalreg->messagebus->InjectMessage(errstr, MSGFLAG_ERROR);
Index: patches/patch-tcpserver_h
===================================================================
RCS file: patches/patch-tcpserver_h
diff -N patches/patch-tcpserver_h
--- patches/patch-tcpserver_h 17 May 2017 16:03:32 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-tcpserver_h,v 1.3 2017/05/17 16:03:32 espie Exp $
-
-Index: tcpserver.h
---- tcpserver.h.orig
-+++ tcpserver.h
-@@ -56,7 +56,7 @@ struct client_command {
- string cmd;
- };
-
--typedef struct server_protocol {
-+struct server_protocol {
- int ref_index;
- string header;
- int required;
-@@ -128,7 +128,7 @@ class TcpServer { (public)
- // of protocol. (ie, send all networks when the client enables the *NETWORK
- // protocol)
- // It returns the index number of the sentence added.
-- int RegisterProtocol(string in_header, int in_required, char **in_fields,
-+ int RegisterProtocol(string in_header, int in_required, const char **in_fields,
- int (*in_printer)(PROTO_PARMS),
- void (*in_enable)(int));
- int FetchProtocolRef(string in_header);
Index: patches/patch-tcpstreamer_cc
===================================================================
RCS file: patches/patch-tcpstreamer_cc
diff -N patches/patch-tcpstreamer_cc
--- patches/patch-tcpstreamer_cc 12 Apr 2018 17:55:08 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-tcpstreamer_cc,v 1.3 2018/04/12 17:55:08 jasper Exp $
-
-Index: tcpstreamer.cc
---- tcpstreamer.cc.orig
-+++ tcpstreamer.cc
-@@ -87,7 +87,7 @@ int TcpStreamer::Setup(unsigned int in_max_clients, st
-
- // Bind the named socket
- // Debug("Server::Setup calling bind()");
-- if (bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
-+ if (::bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
- snprintf(errstr, 1024, "TcpStreamer bind() failed: %s", strerror(errno));
- return (-5);
- }
Index: patches/patch-timetracker_h
===================================================================
RCS file: patches/patch-timetracker_h
diff -N patches/patch-timetracker_h
--- patches/patch-timetracker_h 17 May 2017 16:03:32 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-timetracker_h,v 1.1 2017/05/17 16:03:32 espie Exp $
-
-Index: timetracker.h
---- timetracker.h.orig
-+++ timetracker.h
-@@ -31,7 +31,7 @@
-
- class Timetracker {
- public:
-- typedef struct timer_event {
-+ struct timer_event {
- int timer_id;
-
- // Time it was scheduled
Index: patches/patch-tracktypes_h
===================================================================
RCS file: patches/patch-tracktypes_h
diff -N patches/patch-tracktypes_h
--- patches/patch-tracktypes_h 17 May 2017 16:03:32 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-$OpenBSD: patch-tracktypes_h,v 1.1 2017/05/17 16:03:32 espie Exp $
-
-Index: tracktypes.h
---- tracktypes.h.orig
-+++ tracktypes.h
-@@ -27,7 +27,7 @@
- #include "packet.h"
-
- #ifndef display_network
--typedef struct display_network;
-+struct display_network;
- #endif
-
- // Forward definition
-@@ -90,7 +90,7 @@ enum client_type {
- };
-
- // Client info
--typedef struct wireless_client {
-+struct wireless_client {
- wireless_client() {
- type = client_unknown;
-
-@@ -266,7 +266,7 @@ typedef struct wireless_client {
- };
-
- // A network
--typedef struct wireless_network {
-+struct wireless_network {
- wireless_network() {
- type = network_data;
-
Index: patches/patch-unixdomainserver_cc
===================================================================
RCS file: patches/patch-unixdomainserver_cc
diff -N patches/patch-unixdomainserver_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-unixdomainserver_cc 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: unixdomainserver.cc
+--- unixdomainserver.cc.orig
++++ unixdomainserver.cc
+@@ -64,7 +64,7 @@ int UnixDomainServer::EnableServer() {
+ }
+
+ // Bind the socket
+- if (bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
++ if (::bind(serv_fd, (struct sockaddr *) &serv_sock, sizeof(serv_sock)) < 0) {
+ _MSG("Unix domain server bind() failed: " + string(strerror(errno)),
+ MSGFLAG_ERROR);
+ return -1;
Index: patches/patch-util_h
===================================================================
RCS file: patches/patch-util_h
diff -N patches/patch-util_h
--- patches/patch-util_h 17 May 2017 16:03:32 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-util_h,v 1.3 2017/05/17 16:03:32 espie Exp $
-
-Index: util.h
---- util.h.orig
-+++ util.h
-@@ -54,7 +54,7 @@ int Hex2UChar(unsigned char *in_hex, unsigned char *in
- vector<string> StrTokenize(string in_str, string in_split, int return_partial = 1);
-
- // 'smart' tokenizeing with start/end positions
--typedef struct smart_word_token {
-+struct smart_word_token {
- string word;
- size_t begin;
- size_t end;
Index: patches/patch-uuid_h
===================================================================
RCS file: patches/patch-uuid_h
diff -N patches/patch-uuid_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-uuid_h 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+silence warnings
+
+Index: uuid.h
+--- uuid.h.orig
++++ uuid.h
+@@ -113,7 +113,9 @@ class uuid { (public)
+ char ids[38];
+ snprintf(ids, 38, "%08x-%04hx-%04hx-%04hx-%02hx%02hx%02hx%02hx%02hx%02hx",
+ (unsigned int) *time_low, *time_mid, *time_hi, *clock_seq,
+- node[0], node[1], node[2], node[3], node[4], node[5]);
++ (unsigned short)node[0], (unsigned short)node[1],
++ (unsigned short)node[2], (unsigned short)node[3],
++ (unsigned short)node[4], (unsigned short)node[5]);
+ return string(ids);
+ }
+
Index: pkg/DESCR
===================================================================
RCS file: pkg/DESCR
diff -N pkg/DESCR
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,9 @@
+Kismet is an 802.11 layer2 wireless network detector, sniffer, and
+intrusion detection system. Kismet will work with any wireless card
+which supports raw monitoring (rfmon) mode, and can sniff 802.11b,
+802.11a, and 802.11g traffic.
+
+Kismet identifies networks by passively collecting packets and detecting
+standard named networks, detecting (and given time, decloaking) hidden
+networks, and infering the presence of nonbeaconing networks via data
+traffic.
Index: pkg/DESCR-gpsmap
===================================================================
RCS file: pkg/DESCR-gpsmap
diff -N pkg/DESCR-gpsmap
--- pkg/DESCR-gpsmap 7 Oct 2005 14:13:57 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-gpsmap reads GPS and Network XML datafiles from Kismet and plots
-wireless networks on downloaded vector maps or satellite photos
-or user-supplied images.
Index: pkg/DESCR-main
===================================================================
RCS file: pkg/DESCR-main
diff -N pkg/DESCR-main
--- pkg/DESCR-main 20 Nov 2006 20:54:07 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,9 +0,0 @@
-Kismet is an 802.11 layer2 wireless network detector, sniffer, and
-intrusion detection system. Kismet will work with any wireless card
-which supports raw monitoring (rfmon) mode, and can sniff 802.11b,
-802.11a, and 802.11g traffic.
-
-Kismet identifies networks by passively collecting packets and detecting
-standard named networks, detecting (and given time, decloaking) hidden
-networks, and infering the presence of nonbeaconing networks via data
-traffic.
Index: pkg/MESSAGE
===================================================================
RCS file: pkg/MESSAGE
diff -N pkg/MESSAGE
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/MESSAGE 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,5 @@
+${TRUEPREFIX}/bin/kismet_capture has been installed setuid root, with read/execute
+access granted only to users in the _kismet group. For normal interactive
+use of Kismet, add your username to this group:
+
+ usermod -G _kismet username
Index: pkg/MESSAGE-main
===================================================================
RCS file: pkg/MESSAGE-main
diff -N pkg/MESSAGE-main
--- pkg/MESSAGE-main 20 Nov 2006 20:54:08 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-There are currently NO setuid/gid bits enabled, but if you
-want to use kismet as a normal user you need to set the
-setuid/gid bits manually.
Index: pkg/PLIST
===================================================================
RCS file: pkg/PLIST
diff -N pkg/PLIST
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,45 @@
+@comment $OpenBSD: PLIST-main,v 1.2 2008/06/27 22:10:14 kili Exp $
+@pkgpath net/kismet
+@pkgpath net/kismet,-main
+@pkgpath net/kismet,-gpsmap
+@conflict kismet-gpsmap-*
+@newgroup _kismet:547
+@newuser _kismet:547:_kismet:daemon:Kismet WLAN detector:/nonexistent:/sbin/nologin
+bin/kismet
+@mode 4550
+@group _kismet
+@bin bin/kismet_capture
+@mode
+@group
+@bin bin/kismet_client
+@bin bin/kismet_drone
+@bin bin/kismet_server
+@man man/man1/kismet.1
+@man man/man1/kismet_drone.1
+@man man/man5/kismet.conf.5
+@man man/man5/kismet_drone.conf.5
+share/doc/kismet/
+share/doc/kismet/README
+share/examples/kismet/
+@mode 770
+@sample ${CONFDIR}/
+@mode
+share/examples/kismet/kismet.conf
+@sample ${CONFDIR}/kismet.conf
+share/examples/kismet/kismet_drone.conf
+@sample ${CONFDIR}/kismet_drone.conf
+share/kismet/
+share/kismet/wav/
+share/kismet/wav/alert.wav
+@mode 770
+@owner _kismet
+@group _kismet
+@sample /var/log/kismet/
+@mode
+@owner
+@group
+share/kismet/wav/gpslock.wav
+share/kismet/wav/gpslost.wav
+share/kismet/wav/new.wav
+share/kismet/wav/packet.wav
+@extraunexec rm -rf ${LOCALSTATEDIR}/log/kismet
Index: pkg/PLIST-gpsmap
===================================================================
RCS file: pkg/PLIST-gpsmap
diff -N pkg/PLIST-gpsmap
--- pkg/PLIST-gpsmap 27 Jun 2008 22:10:14 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
-@comment $OpenBSD: PLIST-gpsmap,v 1.2 2008/06/27 22:10:14 kili Exp $
-@bin bin/gpsmap
-@comment bin/gpsmap-helper-earthamaps
-@man man/man1/gpsmap.1
Index: pkg/PLIST-main
===================================================================
RCS file: pkg/PLIST-main
diff -N pkg/PLIST-main
--- pkg/PLIST-main 27 Jun 2008 22:10:14 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,39 +0,0 @@
-@comment $OpenBSD: PLIST-main,v 1.2 2008/06/27 22:10:14 kili Exp $
-@pkgpath net/kismet
-@newgroup _kismet:547
-@newuser _kismet:547:_kismet:daemon:Kismet WLAN detector:/nonexistent:/sbin/nologin
-@bin bin/kismet
-@bin bin/kismet_client
-@bin bin/kismet_drone
-@bin bin/kismet_server
-@man man/man1/kismet.1
-@man man/man1/kismet_drone.1
-@man man/man5/kismet.conf.5
-@man man/man5/kismet_drone.conf.5
-@man man/man5/kismet_ui.conf.5
-share/doc/kismet/
-share/doc/kismet/README
-share/examples/kismet/
-share/examples/kismet/ap_manuf
-@mode 770
-@sample ${CONFDIR}/
-@mode
-@sample ${CONFDIR}/ap_manuf
-share/examples/kismet/client_manuf
-@sample ${CONFDIR}/client_manuf
-share/examples/kismet/kismet.conf
-@sample ${CONFDIR}/kismet.conf
-share/examples/kismet/kismet_drone.conf
-@sample ${CONFDIR}/kismet_drone.conf
-share/examples/kismet/kismet_ui.conf
-@sample ${CONFDIR}/kismet_ui.conf
-share/kismet/
-share/kismet/wav/
-share/kismet/wav/alert.wav
-share/kismet/wav/junk_traffic.wav
-share/kismet/wav/new_network.wav
-share/kismet/wav/traffic.wav
-@mode 770
-@owner _kismet
-@group _kismet
-@sample /var/log/kismet/
This updates our ancient Kismet to the 2016-07-R1 release.
The -gpsmap subpackage is gone. The security model changed
a bit, it's a bit more closely modeled like wireshark.

A helper binary kismet_capture is installed suid root, and mode 4550
and group _kismet. In order to run Kismet as non-root user, you
have to be member of the _kismet group. Very much the same
as it's done for Wireshark.

I had to fiddle a bit in the PLIST with @pkgpath and @conflict
to properly update an installed kismet and kismet-gpsmap.

Other than that, tested on i386 with rum(4) interface.

If someone is using kismet, tests on other platforms and/or
other wireless interface welcome.

Other than that, any comments, concerns or even OK?

cheers,
Sebastian

? kismet-2016.diff
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/kismet/Makefile,v
retrieving revision 1.47
diff -u -r1.47 Makefile
--- Makefile 2 Nov 2018 18:48:39 -0000 1.47
+++ Makefile 30 Jan 2019 21:54:27 -0000
@@ -2,22 +2,19 @@
# Much help came from Alexandre Anriot, Robert Nagy, Bernd Ahlers,
# and, last but not least, Pedro la Peu.

-COMMENT-main= 802.11 layer2 wireless network detector, sniffer, and IDS
-COMMENT-gpsmap= reads GPS and Network XML datafiles and plots networks
+COMMENT= 802.11 layer2 wireless network detector, sniffer, and IDS

# No wireless capabilities
NOT_FOR_ARCHS= m88k

-V= 2008-05-R1
+V= 2016-07-R1
DISTNAME= kismet-${V}
-REVISION-main = 10
-REVISION-gpsmap= 12
-PKGNAME-main= kismet-${V:S,-,,g}
-PKGNAME-gpsmap= kismet-gpsmap-${V:S,-,,g}
+PKGNAME= kismet-${V:S,-,,g}
CATEGORIES= net security

HOMEPAGE= http://www.kismetwireless.net/
MASTER_SITES= ${HOMEPAGE}code/
+EXTRACT_SUFX= .tar.xz

MAINTAINER= Matthias Kilian <kili@openbsd.org>

@@ -34,7 +31,7 @@

CONFIGURE_ARGS= --sysconfdir=${CONFDIR} \
--mandir=${PREFIX}/man \
- --disable-dbus
+ --with-suidgroup=_kismet

CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib"
@@ -47,37 +44,21 @@
# They don't have tests.
NO_TEST= Yes

-PSEUDO_FLAVORS= no_gpsmap
-FLAVOR?=
-
-MULTI_PACKAGES= -main -gpsmap
-
-WANTLIB-main= c m ncurses panel pcap ${COMPILER_LIBCXX}
-WANTLIB-gpsmap= c expat m pthread ${COMPILER_LIBCXX} z \
- MagickCore-6.Q16 gmp>=6
-LIB_DEPENDS-gpsmap= graphics/ImageMagick \
- devel/gmp
+WANTLIB+= c m panel pcap ${COMPILER_LIBCXX} curses util pcre
+LIB_DEPENDS= devel/pcre
+RUN_DEPENDS= net/wireshark,-text

.include <bsd.port.arch.mk>

-.if !${BUILD_PACKAGES:M-gpsmap}
-CONFIGURE_ARGS+= --disable-gpsmap
-.endif
-
post-configure:
- @cd ${WRKSRC} && ${GMAKE} depend
-
-post-patch:
- @perl -pi -e \
- 's,/usr/local/etc(/kismet.conf),${CONFDIR}$$1,' \
- ${WRKSRC}/man/kismet.conf.5
- @perl -pi -e \
- 's,/usr/local/etc(/kismet.conf),${CONFDIR}$$1,' \
- ${WRKSRC}/man/kismet_drone.conf.5
+ ${SUBST_CMD} ${WRKSRC}/conf/kismet.conf \
+ ${WRKSRC}/man/kismet_drone.conf.5
+ cd ${WRKSRC} && ${GMAKE} depend

post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/kismet
${INSTALL_DATA} ${WRKSRC}/README \
${PREFIX}/share/doc/kismet
+ @cd ${WRKSRC} && ${GMAKE} binsuidinstall

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/kismet/distinfo,v
retrieving revision 1.8
diff -u -r1.8 distinfo
--- distinfo 18 Jan 2015 03:14:41 -0000 1.8
+++ distinfo 30 Jan 2019 21:54:27 -0000
@@ -1,2 +1,2 @@
-SHA256 (kismet-2008-05-R1.tar.gz) = opjUT4puyXcCHNSSpyCYfe2BtcS69faLNvEoKiPJ99M=
-SIZE (kismet-2008-05-R1.tar.gz) = 655362
+SHA256 (kismet-2016-07-R1.tar.xz) = vbIfFTMR8f87FmIb8NZ0D2Y2m/CYKwoonJoSr4hH4jc=
+SIZE (kismet-2016-07-R1.tar.xz) = 709364
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- patches/patch-Makefile_in 17 May 2017 16:03:32 -0000 1.8
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,226 +0,0 @@
-$OpenBSD: patch-Makefile_in,v 1.8 2017/05/17 16:03:32 espie Exp $
-
-# Don't hard code -O2 -Wall.
-# Use BSD_INSTALL_* macros for installation.
-
-Index: Makefile.in
---- Makefile.in.orig
-+++ Makefile.in
-@@ -20,9 +20,10 @@ CC = @CC@
- LD = @CXX@
- LDFLAGS = @LDFLAGS@
- LIBS = @LIBS@
-+LIBZ = -lz
- CLIBS = @CLIBS@
- CFLAGS = @CFLAGS@
--CXXFLAGS = -O2 -Wall -DVERSION_MAJOR=\"$(VERSION_MAJOR)\" -DVERSION_MINOR=\"$(VERSION_MINOR)\" -DVERSION_TINY=\"$(VERSION_TINY)\" -DTIMESTAMP=\"`cat TIMESTAMP`\" @CXXFLAGS@
-+CXXFLAGS = -DVERSION_MAJOR=\"$(VERSION_MAJOR)\" -DVERSION_MINOR=\"$(VERSION_MINOR)\" -DVERSION_TINY=\"$(VERSION_TINY)\" -DTIMESTAMP=\"`cat TIMESTAMP`\" @CXXFLAGS@
- CPPFLAGS = @CPPFLAGS@
- SUID = @suid@
-
-@@ -101,8 +102,8 @@ $(GPSL): $(GPSLBUILDO)
- @if test "$(GPSLBUILD)"x = "x"; then \
- echo "Gpsmap cannot be built, check the output of configure"; \
- else \
-- echo $(LD) $(LDFLAGS) -o $(GPSL) $(GPSLO) $(LIBS) `Magick-config --cflags --cppflags --ldflags` `Magick-config --libs` $(THREADL) -lexpat -lgmp; \
-- $(LD) $(LDFLAGS) -o $(GPSL) $(GPSLO) $(LIBS) `Magick-config --cflags --cppflags --ldflags` `Magick-config --libs` $(THREADL) -lexpat -lgmp; \
-+ echo $(LD) $(LDFLAGS) -o $(GPSL) $(GPSLO) $(LIBS) `Magick-config --cflags --cppflags --ldflags` `Magick-config --libs` $(THREADL) -lexpat -lgmp $(LIBZ); \
-+ $(LD) $(LDFLAGS) -o $(GPSL) $(GPSLO) $(LIBS) `Magick-config --cflags --cppflags --ldflags` `Magick-config --libs` $(THREADL) -lexpat -lgmp $(LIBZ); \
- fi
-
- #$(HOPPER): $(HOPPERO)
-@@ -138,53 +139,55 @@ checkuiconfig:
- echo "latest version is `grep version= conf/kismet_ui.conf | cut -f 2 -d=`"; \
- fi
-
-+.PHONY: binuserinstall
-+
- binuserinstall:
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(PS) $(BIN)/$(PS);
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(DRONE) $(BIN)/$(DRONE);
-+ $(BSD_INSTALL_PROGRAM) $(PS) $(BIN)/$(PS);
-+ $(BSD_INSTALL_PROGRAM) $(DRONE) $(BIN)/$(DRONE);
-
- binsuidinstall:
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 4755 $(PS) $(BIN)/$(PS);
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 4755 $(DRONE) $(BIN)/$(DRONE);
-+ $(BSD_INSTALL_PROGRAM) -m 4755 $(PS) $(BIN)/$(PS);
-+ $(BSD_INSTALL_PROGRAM) -m 4755 $(DRONE) $(BIN)/$(DRONE);
-
- commoninstall:
-- mkdir -p $(ETC)
-- mkdir -p $(BIN)
-+ $(BSD_INSTALL_DATA_DIR) $(ETC)
-+ $(BSD_INSTALL_PROGRAM_DIR) $(BIN)
-
-- install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(WRAP) $(BIN)/kismet
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(NC) $(BIN)/$(NC)
-- # install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(HOPPER) $(BIN)/$(HOPPER)
-+ $(BSD_INSTALL_PROGRAM) $(WRAP) $(BIN)/kismet
-+ $(BSD_INSTALL_PROGRAM) $(NC) $(BIN)/$(NC)
-+ # $(BSD_INSTALL_PROGRAM) $(HOPPER) $(BIN)/$(HOPPER)
- @if test "$(ZAURUS)" = "yes"; then \
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(BUZZER) $(BIN)/buzzme; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(BUZZER) $(BIN)/buzzme; \
-+ $(BSD_INSTALL_PROGRAM) $(BUZZER) $(BIN)/buzzme; \
-+ echo $(BSD_INSTALL_PROGRAM) $(BUZZER) $(BIN)/buzzme; \
- fi
--#install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/kismet_monitor $(BIN)/kismet_monitor
--#install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/kismet_unmonitor $(BIN)/kismet_unmonitor
-- mkdir -p $(MAN)/man1
-- install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet.1 $(MAN)/man1/kismet.1
-- # install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_monitor.1 $(MAN)/man1/kismet_monitor.1
-- # install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_hopper.1 $(MAN)/man1/kismet_hopper.1
-- install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_drone.1 $(MAN)/man1/kismet_drone.1
-- mkdir -p $(MAN)/man5
-- install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet.conf.5 $(MAN)/man5/kismet.conf.5
-- install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_ui.conf.5 $(MAN)/man5/kismet_ui.conf.5
-- install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_drone.conf.5 $(MAN)/man5/kismet_drone.conf.5
-+#$(BSD_INSTALL_SCRIPT) scripts/kismet_monitor $(BIN)/kismet_monitor
-+#$(BSD_INSTALL_SCRIPT) scripts/kismet_unmonitor $(BIN)/kismet_unmonitor
-+ $(BSD_INSTALL_MAN_DIR) $(MAN)/man1
-+ $(BSD_INSTALL_MAN) man/kismet.1 $(MAN)/man1/kismet.1
-+ # $(BSD_INSTALL_MAN) man/kismet_monitor.1 $(MAN)/man1/kismet_monitor.1
-+ # $(BSD_INSTALL_MAN) man/kismet_hopper.1 $(MAN)/man1/kismet_hopper.1
-+ $(BSD_INSTALL_MAN) man/kismet_drone.1 $(MAN)/man1/kismet_drone.1
-+ $(BSD_INSTALL_MAN_DIR) $(MAN)/man5
-+ $(BSD_INSTALL_MAN) man/kismet.conf.5 $(MAN)/man5/kismet.conf.5
-+ $(BSD_INSTALL_MAN) man/kismet_ui.conf.5 $(MAN)/man5/kismet_ui.conf.5
-+ $(BSD_INSTALL_MAN) man/kismet_drone.conf.5 $(MAN)/man5/kismet_drone.conf.5
-
- @if test "$(GPSLBUILD)" = "$(GPSL)"; then \
-- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(GPSL) $(BIN)/$(GPSL); \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(GPSL) $(BIN)/$(GPSL); \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/gpsmap-helper-earthamaps $(BIN)/gpsmap-helper-earthamaps; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/gpsmap-helper-earthamaps $(BIN)/gpsmap-helper-earthamaps; \
-- install -o $(INSTUSR) -g $(MANGRP) -m 644 man/gpsmap.1 $(MAN)/man1/gpsmap.1; \
-- echo install -o $(INSTUSR) -g $(MANGRP) -m 644 man/gpsmap.1 $(MAN)/man1/gpsmap.1; \
-+ $(BSD_INSTALL_PROGRAM) $(GPSL) $(BIN)/$(GPSL); \
-+ echo $(BSD_INSTALL_PROGRAM) $(GPSL) $(BIN)/$(GPSL); \
-+ $(BSD_INSTALL_SCRIPT) scripts/gpsmap-helper-earthamaps $(BIN)/gpsmap-helper-earthamaps; \
-+ echo $(BSD_INSTALL_SCRIPT) scripts/gpsmap-helper-earthamaps $(BIN)/gpsmap-helper-earthamaps; \
-+ $(BSD_INSTALL_MAN) man/gpsmap.1 $(MAN)/man1/gpsmap.1; \
-+ echo $(BSD_INSTALL_MAN) man/gpsmap.1 $(MAN)/man1/gpsmap.1; \
- fi
-
-- mkdir -p $(WAV)
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 wav/new_network.wav $(WAV)/new_network.wav
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 wav/traffic.wav $(WAV)/traffic.wav
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 wav/junk_traffic.wav $(WAV)/junk_traffic.wav
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 wav/alert.wav $(WAV)/alert.wav
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/ap_manuf $(ETC)/ap_manuf;
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/client_manuf $(ETC)/client_manuf;
-+ $(BSD_INSTALL_DATA_DIR) $(WAV)
-+ $(BSD_INSTALL_DATA) wav/new_network.wav $(WAV)/new_network.wav
-+ $(BSD_INSTALL_DATA) wav/traffic.wav $(WAV)/traffic.wav
-+ $(BSD_INSTALL_DATA) wav/junk_traffic.wav $(WAV)/junk_traffic.wav
-+ $(BSD_INSTALL_DATA) wav/alert.wav $(WAV)/alert.wav
-+ $(BSD_INSTALL_DATA) conf/ap_manuf $(ETC)/ap_manuf;
-+ $(BSD_INSTALL_DATA) conf/client_manuf $(ETC)/client_manuf;
-
- @if test -f $(BIN)/kismet_curses; then \
- echo "Removing old kismet_curses binary. The panels frontend is now kismet_client."; \
-@@ -197,22 +200,22 @@ suidinstall: $(PS) $(DRONE) $(WRAP) $(NC) $(GPSLBUILD)
- @if test -f $(ETC)/kismet.conf; then \
- $(MAKE) -e checkconfig; \
- else \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet.conf $(ETC)/kismet.conf; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet.conf $(ETC)/kismet.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet.conf $(ETC)/kismet.conf; \
-+ echo $(BSD_INSTALL_DATA) conf/kismet.conf $(ETC)/kismet.conf; \
- echo "Installed config into $(ETC)/kismet.conf."; \
- fi
- @if test -f $(ETC)/kismet_drone.conf; then \
- $(MAKE) -e checkdroneconfig; \
- else \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-+ echo $(BSD_INSTALL_DATA) conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
- echo "Installed drone config into $(ETC)/kismet_drone.conf."; \
- fi
- @if test -f $(ETC)/kismet_ui.conf; then \
- $(MAKE) -e checkuiconfig; \
- else \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-+ echo $(BSD_INSTALL_DATA) conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
- echo "Installed UI config into $(ETC)/kismet_ui.conf."; \
- fi
- @echo "Installed kismet into $(BIN)/."
-@@ -230,22 +233,22 @@ install: $(PS) $(DRONE) $(NC) $(WRAP) $(GPSLBUILD) $(Z
- @if test -f $(ETC)/kismet.conf; then \
- $(MAKE) -e checkconfig; \
- else \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet.conf $(ETC)/kismet.conf; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet.conf $(ETC)/kismet.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet.conf $(ETC)/kismet.conf; \
-+ echo $(BSD_INSTALL_DATA) conf/kismet.conf $(ETC)/kismet.conf; \
- echo "Installed config into $(ETC)/kismet.conf."; \
- fi
- @if test -f $(ETC)/kismet_drone.conf; then \
- $(MAKE) -e checkdroneconfig; \
- else \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-+ echo $(BSD_INSTALL_DATA) conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
- echo "Installed drone config into $(ETC)/kismet_drone.conf."; \
- fi
- @if test -f $(ETC)/kismet_ui.conf; then \
- $(MAKE) -e checkuiconfig; \
- else \
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-- echo install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-+ echo $(BSD_INSTALL_DATA) conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
- echo "Installed UI config into $(ETC)/kismet_ui.conf."; \
- fi
- @echo "Installed kismet into $(BIN)/."
-@@ -261,11 +264,11 @@ install: $(PS) $(DRONE) $(NC) $(WRAP) $(GPSLBUILD) $(Z
- forceinstall: $(PS)
- $(MAKE) -e commoninstall
- $(MAKE) -e binuserinstall
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet.conf $(ETC)/kismet.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet.conf $(ETC)/kismet.conf; \
- echo "Installed config into $(ETC)/kismet.conf.";
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
- echo "Installed drone config into $(ETC)/kismet_drone.conf.";
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
- echo "Installed UI config into $(ETC)/kismet_ui.conf.";
- @echo "Installed kismet into $(BIN)/."
- @echo "If you have not done so already, read the README file and the FAQ file. Additional"
-@@ -280,11 +283,11 @@ forceinstall: $(PS)
- suidforceinstall: $(PS)
- $(MAKE) -e commoninstall
- $(MAKE) -e binsuidinstall
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet.conf $(ETC)/kismet.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet.conf $(ETC)/kismet.conf; \
- echo "Installed config into $(ETC)/kismet.conf.";
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_drone.conf $(ETC)/kismet_drone.conf; \
- echo "Installed drone config into $(ETC)/kismet_drone.conf.";
-- install -o $(INSTUSR) -g $(INSTGRP) -m 644 conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
-+ $(BSD_INSTALL_DATA) conf/kismet_ui.conf $(ETC)/kismet_ui.conf; \
- echo "Installed UI config into $(ETC)/kismet_ui.conf.";
- @echo "Installed kismet into $(BIN)/."
- @echo "If you have not done so already, read the README file and the FAQ file. Additional"
-@@ -371,13 +374,11 @@ depend:
- @$(MAKE) $(DEPEND)
-
- $(DEPEND):
-- @-rm -f $(DEPEND)
-+ @rm -f $(DEPEND)
- @echo "Generating dependencies... "
- @echo > $(DEPEND)
-- @$(CXX) $(CFLAGS) -MM \
-+ @$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MM \
- `echo $(PSO) $(DRONEO) $(GPSLO) $(NCO) | sed -e "s/\.o/\.cc/g" | sed -e "s/\.mo/\.m/g"` >> $(DEPEND)
--
--include $(DEPEND)
-
- .c.o: $(DEPEND)
- $(CC) $(CFLAGS) -c $*.c -o $@
Index: patches/patch-alertracker_h
===================================================================
RCS file: patches/patch-alertracker_h
diff -N patches/patch-alertracker_h
--- patches/patch-alertracker_h 17 May 2017 16:03:32 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-alertracker_h,v 1.1 2017/05/17 16:03:32 espie Exp $
-
-Index: alertracker.h
---- alertracker.h.orig
-+++ alertracker.h
-@@ -43,7 +43,7 @@ enum alert_time_unit {
- class Alertracker {
- public:
- // A registered alert type
-- typedef struct alert_rec {
-+ struct alert_rec {
- int ref_index;
- string header;
-
Index: patches/patch-conf_kismet_conf_in
===================================================================
RCS file: /cvs/ports/net/kismet/patches/patch-conf_kismet_conf_in,v
retrieving revision 1.6
diff -u -r1.6 patch-conf_kismet_conf_in
--- patches/patch-conf_kismet_conf_in 10 Nov 2007 21:10:42 -0000 1.6
+++ patches/patch-conf_kismet_conf_in 30 Jan 2019 21:54:27 -0000
@@ -1,58 +1,46 @@
-$OpenBSD: patch-conf_kismet_conf_in,v 1.6 2007/11/10 21:10:42 kili Exp $
---- conf/kismet.conf.in.orig Sun Oct 7 17:48:51 2007
-+++ conf/kismet.conf.in Sun Oct 7 17:51:25 2007
-@@ -10,7 +10,7 @@ version=2007.09.R1
- servername=Kismet
-
- # User to setid to (should be your normal user)
--suiduser=your_user_here
-+suiduser=_kismet
-
- # Do we try to put networkmanager to sleep? If you use NM, this is probably
- # what you want to do, so that it will leave the interfaces alone while
-@@ -24,6 +24,10 @@ networkmanagersleep=true
- # The initial channel is optional, if hopping is not enabled it can be used
- # to set the channel the interface listens on.
- # YOU MUST CHANGE THIS TO BE THE SOURCE YOU WANT TO USE
-+# OpenBSD examples:
-+# a/b: source=radiotap_bsd_ab,ath0,radiotap_bsd_ab
-+# b: source=radiotap_bsd_b,ipw0,radiotap_bsd_b
-+# b (wi(4)) source=prism2_openbsd,wi0,prism2_openbsd
- source=none,none,addme
+$OpenBSD$
+
+Index: conf/kismet.conf.in
+--- conf/kismet.conf.in.orig
++++ conf/kismet.conf.in
+@@ -11,7 +11,7 @@ version=2009-newcore
+ # servername=Kismet Server
+
+ # Prefix of where we log (as used in the logtemplate later)
+-# logprefix=/some/path/to/logs
++logprefix=${LOCALSTATEDIR}/log/kismet
+
+ # Do we process the contents of data frames? If this is enabled, data
+ # frames will be truncated to the headers only immediately after frame type
+@@ -30,6 +30,8 @@ allowplugins=true
+ # ncsource=wlan0
+ # ncsource=wifi0:type=madwifi
+ # ncsource=wlan0:name=intel,hop=false,channel=11
++# Generic OpenBSD example
++# ncsource=rum0:type=radiotap_bsd

# Comma-separated list of sources to enable. This is only needed if you defined
-@@ -206,7 +210,7 @@ trackivs=false
- # server itself will play sound. Primarily for headless or automated systems.
- sound=false
- # Path to sound player
--soundplay=/usr/bin/play
-+soundplay=/usr/local/bin/play
- # Optional parameters to pass to the player
- # soundopts=--volume=.3
- # New network found
-@@ -264,7 +268,7 @@ metric=false
- # recent versions of GPSDrive's native support of Kismet.
- waypoints=false
- # GPSDrive waypoint file. This WILL be truncated.
--waypointdata=%h/.gpsdrive/way_kismet.txt
-+waypointdata=/var/log/kismet/way_kismet.txt
- # Do we want ESSID or BSSID as the waypoint name ?
- waypoint_essid=false
-
-@@ -362,14 +366,14 @@ logdefault=Kismet
- # crypt/Pok-Dec-20-01-1
- # and so on. The "dump", "crypt", etc, dirs must exist before kismet is run
- # in this case.
--logtemplate=%n-%d-%i.%l
-+logtemplate=/var/log/kismet/%n-%d-%i.%l
-
- # Where do we store the pid file of the server?
- piddir=/var/run/
-
- # Where state info, etc, is stored. You shouldnt ever need to change this.
- # This is a directory.
--configdir=%h/.kismet/
-+configdir=/var/log/kismet/
+ # multiple sources and only want to enable some of them. By default, all defined
+@@ -122,10 +124,7 @@ maxbacklog=5000
+ # OUI file, expected format 00:11:22<tab>manufname
+ # IEEE OUI file used to look up manufacturer info. We default to the
+ # wireshark one since most people have that.
+-ouifile=/etc/manuf
+-ouifile=/usr/share/wireshark/wireshark/manuf
+-ouifile=/usr/share/wireshark/manuf
+-ouifile=/Applications/Wireshark.app/Contents/Resources/share/wireshark/manuf
++ouifile=${LOCALBASE}/share/wireshark/manuf
+
+ # Do we have a GPS?
+ gps=true
+@@ -278,8 +277,8 @@ alertbacklog=50
+ logtypes=pcapdump,gpsxml,netxml,nettxt,alert
+
+ # Format of the pcap dump (PPI or 80211)
+-pcapdumpformat=ppi
+-# pcapdumpformat=80211
++# pcapdumpformat=ppi
++pcapdumpformat=80211

- # cloaked SSID file. You shouldn't ever need to change this.
- ssidmap=ssid_map
+ # Default log title
+ logdefault=Kismet
Index: patches/patch-conf_kismet_drone_conf
===================================================================
RCS file: patches/patch-conf_kismet_drone_conf
diff -N patches/patch-conf_kismet_drone_conf
--- patches/patch-conf_kismet_drone_conf 27 Jul 2005 21:37:26 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-conf_kismet_drone_conf,v 1.1.1.1 2005/07/27 21:37:26 robert Exp $
---- conf/kismet_drone.conf.orig Wed Jun 22 06:22:13 2005
-+++ conf/kismet_drone.conf Sun Jun 26 22:04:56 2005
-@@ -6,7 +6,7 @@ version=Feb.04.01a
- servername=Kismet
-
- # User to setid to (should be your normal user)
--suiduser=your_user_here
-+suiduser=_kismet
-
- # Port to serve packet data... This probably shouldn't be the same as the port
- # you configured kismet_server for, or else you'll have problems running them
Index: patches/patch-conf_kismet_ui_conf_in
===================================================================
RCS file: patches/patch-conf_kismet_ui_conf_in
diff -N patches/patch-conf_kismet_ui_conf_in
--- patches/patch-conf_kismet_ui_conf_in 10 Nov 2007 21:10:42 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-conf_kismet_ui_conf_in,v 1.2 2007/11/10 21:10:42 kili Exp $
---- conf/kismet_ui.conf.in.orig Sun Sep 9 23:01:01 2007
-+++ conf/kismet_ui.conf.in Sun Sep 9 23:06:28 2007
-@@ -24,7 +24,7 @@ clientcolumns=decay,type,mac,manuf,data,crypt,size,ip,
- # noise on whatever host it's running on.
- sound=true
- # Path to sound player
--soundplay=/usr/bin/play
-+soundplay=/usr/local/bin/play
- # Optional parameters to pass to the player
- # soundopts=--volume=.3
- # New network found
Index: patches/patch-config_h_in
===================================================================
RCS file: /cvs/ports/net/kismet/patches/patch-config_h_in,v
retrieving revision 1.1
diff -u -r1.1 patch-config_h_in
--- patches/patch-config_h_in 17 May 2017 16:03:32 -0000 1.1
+++ patches/patch-config_h_in 30 Jan 2019 21:54:27 -0000
@@ -1,13 +1,15 @@
-$OpenBSD: patch-config_h_in,v 1.1 2017/05/17 16:03:32 espie Exp $
+$OpenBSD$
+
+shut up:
+warning: using directive refers to implicitly-defined namespace 'std'

Index: config.h.in
--- config.h.in.orig
+++ config.h.in
-@@ -291,6 +291,8 @@
+@@ -317,6 +317,7 @@

/* Namespace (on non-obj-c files) */
#ifndef __IN_OBJC_FILE__
-+/* prevent clang from complaining about premature namespace */
+#include <iosfwd>
using namespace std;
#define __STL_USE_NAMESPACES
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- patches/patch-configure 11 Nov 2010 14:11:34 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-configure,v 1.3 2010/11/11 14:11:34 espie Exp $
---- configure.orig Mon May 12 22:14:14 2008
-+++ configure Thu Nov 11 15:01:31 2010
-@@ -9474,7 +9474,7 @@ if test $ac_cv_lib_z_gzopen = yes; then
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_LIBZ 1
- _ACEOF
-- LIBS="$LIBS -lz" libz="yes"
-+ libz="yes"
- else
- { echo "$as_me:$LINENO: WARNING: Unable to find libz compression" >&5
- echo "$as_me: WARNING: Unable to find libz compression" >&2;}
-@@ -9877,7 +9877,7 @@ sharedatadir=`(
- test "$exec_prefix" = NONE && exec_prefix=${prefix}
- eval echo "$sharedatadir"
- )`
--sharedatadir=${sharedatadir}
-+eval sharedatadir=${sharedatadir}
-
-
- ac_config_files="$ac_config_files Makefile extra/buzzme/Makefile extra/Makefile conf/kismet.conf conf/kismet_ui.conf"
Index: patches/patch-dronesource_cc
===================================================================
RCS file: patches/patch-dronesource_cc
diff -N patches/patch-dronesource_cc
--- patches/patch-dronesource_cc 12 Apr 2018 17:55:08 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-dronesource_cc,v 1.1 2018/04/12 17:55:08 jasper Exp $
-
-Index: dronesource.cc
---- dronesource.cc.orig
-+++ dronesource.cc
-@@ -58,7 +58,7 @@ int DroneSource::OpenSource() {
- local_sock.sin_addr.s_addr = htonl(INADDR_ANY);
- local_sock.sin_port = htons(0);
-
-- if (bind(drone_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
-+ if (::bind(drone_fd, (struct sockaddr *) &local_sock, sizeof(local_sock)) < 0) {
- snprintf(errstr, 1024, "bind() failed %d (%s)\n", errno, strerror(errno));
- return (-3);
- }
Index: patches/patch-finitestate_cc
===================================================================
RCS file: patches/patch-finitestate_cc
diff -N patches/patch-finitestate_cc
--- patches/patch-finitestate_cc 12 Apr 2018 17:55:08 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-finitestate_cc,v 1.1 2018/04/12 17:55:08 jasper Exp $
-
-Index: finitestate.cc
---- finitestate.cc.orig
-+++ finitestate.cc
-@@ -224,7 +224,7 @@ int BssTimestampAutomata::ProcessPacket(const packet_i
- // Generate an alert, we're getting a bunch of invalid timestamps
-
- snprintf(atext, STATUS_MAX, "Out-of-sequence BSS timestamp on %s "
-- "- got %"PRIx64", expected %"PRIx64" - this could indicate AP spoofing",
-+ "- got %" PRIx64 ", expected %" PRIx64 " - this could indicate AP spoofing",
- in_info->bssid_mac.Mac2String().c_str(), in_info->timestamp,
- elem->bss_timestamp);
- atracker->RaiseAlert(alertid, in_info->bssid_mac, 0, 0, 0,
Index: patches/patch-frontend_h
===================================================================
RCS file: patches/patch-frontend_h
diff -N patches/patch-frontend_h
--- patches/patch-frontend_h 17 May 2017 16:03:32 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-frontend_h,v 1.1 2017/05/17 16:03:32 espie Exp $
-
-Index: frontend.h
---- frontend.h.orig
-+++ frontend.h
-@@ -56,7 +56,7 @@ enum group_type {
- };
-
- // What do we actually display
--typedef struct display_network {
-+struct display_network {
- // Are we a group or just a single network?
- group_type type;
- // If we're a group, this will hold multiple networks
Index: patches/patch-gpsd_cc
===================================================================
RCS file: patches/patch-gpsd_cc
diff -N patches/patch-gpsd_cc
--- patches/patch-gpsd_cc 12 Apr 2018 17:55:08 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-gpsd_cc,v 1.1 2018/04/12 17:55:08 jasper Exp $
-
-Index: gpsd.cc
---- gpsd.cc.orig
-+++ gpsd.cc
-@@ -93,7 +93,7 @@ int GPSD::OpenGPSD() {
- localaddr.sin_addr.s_addr = htonl(INADDR_ANY);
- localaddr.sin_port = htons(0);
-
-- if (bind(sock, (struct sockaddr *) &localaddr, sizeof(localaddr)) < 0) {
-+ if (::bind(sock, (struct sockaddr *) &localaddr, sizeof(localaddr)) < 0) {
- snprintf(errstr, 1024, "GPSD cannot bind port: %s", strerror(errno));
- CloseGPSD();
- return -1;
Index: patches/patch-gpsd_h
===================================================================
RCS file: patches/patch-gpsd_h
diff -N patches/patch-gpsd_h
--- patches/patch-gpsd_h 10 Sep 2016 13:03:42 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-gpsd_h,v 1.1 2016/09/10 13:03:42 ajacoutot Exp $
---- gpsd.h.orig Sat Sep 10 11:52:50 2016
-+++ gpsd.h Sat Sep 10 11:53:11 2016
-@@ -22,6 +22,7 @@
- #include "config.h"
-
- #include <sys/types.h>
-+#include <sys/select.h> /* fd_set */
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
Index: patches/patch-gpsdump_cc
===================================================================
RCS file: patches/patch-gpsdump_cc
diff -N patches/patch-gpsdump_cc
--- patches/patch-gpsdump_cc 17 May 2017 16:03:32 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-gpsdump_cc,v 1.1 2017/05/17 16:03:32 espie Exp $
-
-Index: gpsdump.cc
---- gpsdump.cc.orig
-+++ gpsdump.cc
-@@ -108,7 +108,7 @@ int GPSDump::DumpTrack(GPSD *in_gps) {
-
- int sig = 0, qual = 0, noise = 0;
-
-- if (time(0) - last_info.ts.tv_sec < decay && last_info.quality != -1) {
-+ if (time(0) - last_info.ts.tv_sec < rdecay && last_info.quality != -1) {
- sig = last_info.signal;
- qual = last_info.quality;
- noise = last_info.noise;
Index: patches/patch-gpsdump_h
===================================================================
RCS file: patches/patch-gpsdump_h
diff -N patches/patch-gpsdump_h
--- patches/patch-gpsdump_h 17 May 2017 16:03:32 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-gpsdump_h,v 1.1 2017/05/17 16:03:32 espie Exp $
-
-Index: gpsdump.h
---- gpsdump.h.orig
-+++ gpsdump.h
-@@ -41,7 +41,7 @@
- // Link to last_info in kismet_server.cc
- extern packet_info last_info;
- // Link to decay rate in kismet_server.cc
--extern int decay;
-+extern int rdecay;
-
- #define GPS_VERSION 5
-
Index: patches/patch-gpsmap_cc
===================================================================
RCS file: patches/patch-gpsmap_cc
diff -N patches/patch-gpsmap_cc
--- patches/patch-gpsmap_cc 18 May 2017 12:41:58 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,308 +0,0 @@
-$OpenBSD: patch-gpsmap_cc,v 1.7 2017/05/18 12:41:58 espie Exp $
-
-# Disable map sources known to be broken.
-# Use our ftp(1) instead of wget.
-# Fix OSM map source (OSM already provides PNGs, not GIFs).
-# If the first attempt to load the image fails, reset the exception,
-# because ImageMagick would bail out on the second attempt (after the
-# download).
-
-Index: gpsmap.cc
---- gpsmap.cc.orig
-+++ gpsmap.cc
-@@ -90,24 +90,24 @@ const char *config_base = "kismet.conf";
- // Broken map sources... Damn vendors changing.
- // Mappoint
- // const char url_template_mp[] = "http://msrvmaps.mappoint.net/isapi/MSMap.dll?ID=3XNsF.&C=%f,%f&L=USA&CV=1&A=%ld&S=%d,%d&O=0.000000,0.000000&MS=0&P=|5748|";
-+// Terraserver photo-maps and topo maps
-+// const char url_template_ts[] = "http://terraservice.net/GetImageArea.ashx?t=1&lat=%f&lon=%f&s=%ld&w=%d&h=%d";
-+// const char url_template_tt[] = "http://terraservice.net/GetImageArea.ashx?t=2&lat=%f&lon=%f&s=%ld&w=%d&h=%d";
-
-+// Earthamaps need a perl helper script to get data because of cookies
-+// const char url_template_em[] = "gpsmap-helper-earthamaps %s %f %f %d %d %ld";
- // Mapblast
- const char url_template_mb[] = "http://go.vicinity.com/homedepotvd/MakeMap.d?&CT=%f:%f:%ld&IC=&W=%d&H=%d&FAM=mblast&LB=%s";
-
--// Terraserver photo-maps and topo maps
--const char url_template_ts[] = "http://terraservice.net/GetImageArea.ashx?t=1&lat=%f&lon=%f&s=%ld&w=%d&h=%d";
--const char url_template_tt[] = "http://terraservice.net/GetImageArea.ashx?t=2&lat=%f&lon=%f&s=%ld&w=%d&h=%d";
- // Tiger census vector maps
- const char url_template_ti[] = "http://tiger.census.gov/cgi-bin/mapper/map.gif?lat=%f&lon=%f&wid=0.001&ht=%f&iwd=%d&iht=%d&on=majroads&on=places&on=shorelin&on=streets&on=interstate&on=statehwy&on=ushwy&on=water&tlevel=-&tvar=-&tmeth=i";
--// Earthamaps need a perl helper script to get data because of cookies
--const char url_template_em[] = "gpsmap-helper-earthamaps %s %f %f %d %d %ld";
-
- const char url_template_euex[] = "http://www.expedia.de/pub/agent.dll?qscr=mrdt&ID=3XNsF.&CenP=%f,%f&Lang=%s&Alti=%ld&Size=%d,%d&Offs=0.000000,0.000000&BCheck=1";
-
- const char url_template_osm[] = "http://tah.openstreetmap.org/MapOf/?lat=%f&long=%f&z=%d&w=%d&h=%d&format=png";
-
--// Download template for sources that we fetch using wget
--const char download_template[] = "wget \"%s\" -O %s";
-+// Download template for sources that we fetch using ftp
-+const char download_template[] = "/usr/bin/ftp -o %s \"%s\"";
-
- // Image scales we try to autofetch
- long int scales[] = { 1000, 2000, 5000, 10000, 20000, 30000, 50000, 60000,
-@@ -182,7 +182,7 @@ char *channelcolors[] = {
- "#808080", "#CCCCCC"
- };
- */
--char *channelcolors[] = {
-+const char *channelcolors[] = {
- "#FF0000", "#FF6000", "#A08000",
- "#80A000", "#60FF00", "#00FF00",
- "#00FF60", "#00A080", "#0080A0",
-@@ -191,7 +191,7 @@ char *channelcolors[] = {
- int channelcolor_max = 14;
-
- // Origional
--char *powercolors_Orig[] = {
-+const char *powercolors_Orig[] = {
- "#FF0000", "#FFD500", "#FFCC00",
- "#F2FF00", "#7BFF00", "#00FFB6",
- "#00FFFF", "#005DFF", "#A100FF",
-@@ -199,7 +199,7 @@ char *powercolors_Orig[] = {
- };
- const int power_steps_Orig = 10;
- // Blue powercolors
--char *powercolors_Blue[] = {
-+const char *powercolors_Blue[] = {
- "#A0A0FF",
- "#9B9BFA",
- "#9696F5",
-@@ -236,7 +236,7 @@ char *powercolors_Blue[] = {
- const int power_steps_Blue = 32;
-
- // Math progression
--char *powercolors_Math[] = {
-+const char *powercolors_Math[] = {
- "#FF0000", "#FF8000", "#FFFF00",
- "#80FF00", "#00FF00", "#00FF80",
- "#00FFFF", "#0080FF", "#0000FF",
-@@ -244,7 +244,7 @@ char *powercolors_Math[] = {
- };
- const int power_steps_Math = 12;
- // Weather Radar
--char *powercolors_Radar[] = {
-+const char *powercolors_Radar[] = {
- "#50E350", "#39C339", "#208420",
- "#145A14", "#C8C832", "#DC961E",
- "#811610", "#B31A17", "#E61E1E"
-@@ -256,7 +256,7 @@ const int power_max = 255;
- int powercolor_index = 0;
-
- // Label gravity
--char *label_gravity_list[] = {
-+const char *label_gravity_list[] = {
- "northwest", "north", "northeast",
- "west", "center", "east",
- "southwest", "south", "southeast"
-@@ -297,7 +297,7 @@ bool hullPoint::operator() (const hullPoint& a, const
- return a.angle < b.angle;
- }
-
--typedef struct gps_network {
-+struct gps_network {
-
- gps_network() {
- filtered = 0;
-@@ -411,7 +411,7 @@ int mapsource = -1;
- int power_resolution = 5;
- // Interpolation colors
- // strength colors
--char **power_colors = NULL;
-+const char **power_colors = NULL;
- int power_steps = 0;
- // Center resolution (size of circle)
- int center_resolution = 2;
-@@ -1512,29 +1512,6 @@ int BestMapScale(long int *in_mapscale, long int *in_f
- double mapx, mapy;
- double map2x, map2y;
-
-- if ((mapsource == MAPSOURCE_TERRA) || (mapsource == MAPSOURCE_TERRATOPO)) {
-- for (int x = 0; terrascales[x] != -1; x++) {
-- calcxy(&mapx, &mapy, tlat, tlon,
-- (double) terrascales[x]/PIXELFACT,
-- map_avg_lat, map_avg_lon);
-- calcxy(&map2x, &map2y, blat, blon,
-- (double) terrascales[x]/PIXELFACT,
-- map_avg_lat, map_avg_lon);
--
-- if ((mapx < 0 || mapx > map_width || mapy < 0 ||
-- mapy > map_height) ||
-- (map2x < 0 || map2x > map_width ||
-- map2y < 0 || map2y > map_height)) {
-- continue;
-- } else {
-- (*in_mapscale) = terrascales[x];
-- (*in_fetchscale) = x + 10;
-- return 1;
-- }
-- }
-- return -1;
-- }
--
- if (mapsource == MAPSOURCE_EUEX) {
- for (int x = 0; euexscales[x] != -1; x++) {
- calcxy(&mapx, &mapy, tlat, tlon,
-@@ -1581,35 +1558,6 @@ int BestMapScale(long int *in_mapscale, long int *in_f
- return -1;
- }
-
-- if (mapsource == MAPSOURCE_EARTHAMAPS) {
-- // Find how many scales we have
-- int nscales;
-- for (nscales = 0; earthamapscales[nscales] != -1; nscales++)
-- ; // Nothing
--
-- for (int x = (nscales - 1); x > 1; x--) {
-- calcxy(&mapx, &mapy, tlat, tlon,
-- (double) earthamapscales[x]/PIXELFACT,
-- map_avg_lat, map_avg_lon);
-- calcxy(&map2x, &map2y, blat, blon,
-- (double) earthamapscales[x]/PIXELFACT,
-- map_avg_lat, map_avg_lon);
--
-- if ((mapx < 0 || mapx > map_width || mapy < 0 ||
-- mapy > map_height) ||
-- (map2x < 0 || map2x > map_width ||
-- map2y < 0 || map2y > map_height)) {
-- continue;
-- } else {
-- (*in_mapscale) = earthamapscales[x];
-- (*in_fetchscale) = x;
-- return 1;
-- }
-- }
--
-- return -1;
-- }
--
- // Mapblast style scale finding
- for (int x = 0; scales[x] != -1; x++) {
- calcxy(&mapx, &mapy, tlat, tlon, (double) scales[x]/PIXELFACT,
-@@ -2154,7 +2102,7 @@ void DrawNetBoundRects(vector<gps_network *> in_nets,
-
- // Thread function to compute a line of interpolated data
-
--typedef struct powerline_arg {
-+struct powerline_arg {
- // unsigned int y;
- // unsigned int y_max;
- unsigned int in_res;
-@@ -2397,8 +2345,8 @@ void DrawNetPower(vector<gps_network *> in_nets, Image
- delete[] power_map;
- delete[] power_input_map;
- delete[] colormap;
-- delete point_template;
-- delete rect_template;
-+ delete[] point_template;
-+ delete[] rect_template;
- }
-
- void DrawNetCenterDot(vector<gps_network *> in_nets, Image *in_img, DrawInfo *in_di) {
-@@ -4016,30 +3964,6 @@ int main(int argc, char *argv[]) {
- // Some day this needs to get rewritten to not be using a source that doesn't
- // work anymore as the internal reference point.
-
-- if (((mapsource == MAPSOURCE_TERRA) ||
-- (mapsource == MAPSOURCE_TERRATOPO)) && user_scale != 0) {
-- // It's way too much of a kludge to muck with munging the scale around
-- if ((user_scale < 10) || (user_scale > 16)) {
-- fprintf(stderr, "FATAL: You must provide a scale with the -s "
-- "option that is from 10 to 16\n");
-- exit(0);
-- }
-- fetch_scale = user_scale;
-- map_scale = user_scale = terrascales[(user_scale - 10)];
-- }
--
-- // Require the user to specify a scale between 2 and 15, then set
-- // {map,user}_scale to the cooresponding element in earthamapscales[].
-- if (mapsource == MAPSOURCE_EARTHAMAPS && user_scale != 0) {
-- if ((user_scale < 2) || (user_scale > 15)) {
-- fprintf(stderr, "FATAL: You must provide a scale with the -s "
-- "option that is from 2 to 15\n");
-- exit(0);
-- }
-- fetch_scale = user_scale;
-- map_scale = user_scale = earthamapscales[user_scale];
-- }
--
- if (ap_manuf_name != NULL) {
- char pathname[1024];
-
-@@ -4181,8 +4105,9 @@ int main(int argc, char *argv[]) {
- }
-
- if (!usermap) {
-- snprintf(mapname, 1024, "map_%f_%f_%ld_%d_%d.gif", map_avg_lat,
-- map_avg_lon, map_scale, map_width, map_height);
-+ snprintf(mapname, 1024, "map_%f_%f_%ld_%d_%d.%s", map_avg_lat,
-+ map_avg_lon, map_scale, map_width, map_height,
-+ mapsource == MAPSOURCE_OSM ? "png" : "gif");
- }
-
- if (useroutmap == false)
-@@ -4227,7 +4152,10 @@ int main(int argc, char *argv[]) {
- exit(1);
- }
-
-- if (mapsource == MAPSOURCE_MAPPOINT) {
-+ if (mapsource == MAPSOURCE_MAPPOINT
-+ || mapsource == MAPSOURCE_TERRA
-+ || mapsource == MAPSOURCE_EARTHAMAPS
-+ || mapsource == MAPSOURCE_TERRATOPO) {
- fprintf(stderr, "The source you selected is known to be broken. "
- "Support remains for this source only if previously "
- "downloaded maps are available, because the map vendor has "
-@@ -4242,18 +4170,9 @@ int main(int argc, char *argv[]) {
- snprintf(url, 1024, url_template_mb, map_avg_lat, map_avg_lon,
- map_scale, map_width, map_height,
- metric ? "&DU=KM" : "");
-- } else if (mapsource == MAPSOURCE_TERRA) {
-- snprintf(url, 1024, url_template_ts, map_avg_lat, map_avg_lon,
-- fetch_scale, map_width, map_height);
-- } else if (mapsource == MAPSOURCE_TERRATOPO) {
-- snprintf(url, 1024, url_template_tt, map_avg_lat, map_avg_lon,
-- fetch_scale, map_width, map_height);
- } else if (mapsource == MAPSOURCE_TIGER) {
- snprintf(url, 1024, url_template_ti, map_avg_lat, map_avg_lon,
- (map_scale / 300000.0), map_width, map_height);
-- } else if (mapsource == MAPSOURCE_EARTHAMAPS) {
-- snprintf(url, 1024, url_template_em, mapname, map_avg_lat,
-- map_avg_lon, map_width, map_height, fetch_scale);
- } else if (mapsource == MAPSOURCE_EUEX) {
- fetch_scale = (long) (map_scale / 3950);
- char loc[8] = "USA0409";
-@@ -4294,24 +4213,16 @@ int main(int argc, char *argv[]) {
- printf("Map url: %s\n", url);
- printf("Fetching map...\n");
-
-- if (mapsource == MAPSOURCE_EARTHAMAPS) {
-- int retval = system(url);
-+ char geturl[1024];
-+ snprintf(geturl, 1024, download_template, mapname, url);
-+ if (system(geturl)!=0) {
-+ fprintf(stderr, "WARNING: failed to execute '%s'\n", geturl);
-+ exit(1);
-+ }
-
-- if (retval != 0) {
-- fprintf(stderr, "Could not run %s: %s\n", url, strerror(retval));
-- exit(1);
-- }
-- } else {
-- char geturl[1024];
-- snprintf(geturl, 1024, download_template, url, mapname);
-- if (system(geturl)!=0) {
-- fprintf(stderr, "WARNING: failed to execute '%s'\n", geturl);
-- exit(1);
-- }
-- }
--
- printf("Loading map into Imagemagick structures.\n");
- strcpy(img_info->filename, mapname);
-+ ClearMagickException(&im_exception);
- img = ReadImage(img_info, &im_exception);
-
- if (img == (Image *) NULL) {
Index: patches/patch-kis_panel_widgets_cc
===================================================================
RCS file: patches/patch-kis_panel_widgets_cc
diff -N patches/patch-kis_panel_widgets_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-kis_panel_widgets_cc 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+explicitly cast
+
+Index: kis_panel_widgets.cc
+--- kis_panel_widgets.cc.orig
++++ kis_panel_widgets.cc
+@@ -2582,7 +2582,7 @@ int Kis_Single_Input::KeyPress(int in_key) {
+ // and if we have room, insert it and scroll to the right
+ if ((int) text.length() < max_len &&
+ filter_map.find(in_key) != filter_map.end()) {
+- char ins[2] = { in_key, 0 };
++ char ins[2] = { (char)in_key, 0 };
+ text.insert(inp_pos, ins);
+ inp_pos++;
+
Index: patches/patch-kismet_server_cc
===================================================================
RCS file: patches/patch-kismet_server_cc
diff -N patches/patch-kismet_server_cc
--- patches/patch-kismet_server_cc 17 May 2017 16:03:32 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,77 +0,0 @@
-$OpenBSD: patch-kismet_server_cc,v 1.3 2017/05/17 16:03:32 espie Exp $
-
-Index: kismet_server.cc
---- kismet_server.cc.orig
-+++ kismet_server.cc
-@@ -114,7 +114,7 @@ FifoDumpFile fifodump;
- TcpServer ui_server;
- int sound = -1;
- packet_info last_info;
--int decay;
-+int rdecay;
- channel_power channel_graph[CHANNEL_MAX];
- char *servername = NULL;
-
-@@ -172,7 +172,7 @@ int filter_export_bssid_invert = -1, filter_export_sou
- filter_export_dest_invert = -1;
-
- // For alert enabling...
--typedef struct _alert_enable {
-+struct _alert_enable {
- string alert_name;
- alert_time_unit limit_unit;
- alert_time_unit burst_unit;
-@@ -229,7 +229,7 @@ int retain_monitor;
- int netcryptdetect = 0;
-
- // Shutdown/restore networkmanager (if we can)
--int networkmanager_control(char *cmd) {
-+int networkmanager_control(const char *cmd) {
- #ifdef HAVE_DBUS
- DBusMessage* msg;
- DBusConnection* conn;
-@@ -759,7 +759,7 @@ void NetWriteInfo() {
- snprintf(tmpstr, 32, "%d", tracker.FetchNumPackets() - last_packnum);
- idata.rate = tmpstr;
-
-- if (time(0) - last_info.ts.tv_sec < decay && last_info.signal != -1)
-+ if (time(0) - last_info.ts.tv_sec < rdecay && last_info.signal != -1)
- snprintf(tmpstr, 16, "%d %d" , last_info.signal, last_info.noise);
- else if (last_info.quality == -1)
- snprintf(tmpstr, 16, "-1 -1");
-@@ -1543,7 +1543,7 @@ int ProcessBulkConf(ConfigFile *conf) {
- }
-
- if (conf->FetchOpt("decay") != "") {
-- if (sscanf(conf->FetchOpt("decay").c_str(), "%d", &decay) != 1) {
-+ if (sscanf(conf->FetchOpt("decay").c_str(), "%d", &rdecay) != 1) {
- fprintf(stderr, "FATAL: Illegal config file value for decay.\n");
- ErrorShutdown();
- }
-@@ -2237,7 +2237,7 @@ int main(int argc,char *argv[]) {
- { 0, 0, 0, 0 }
- };
- int option_index;
-- decay = 5;
-+ rdecay = 5;
-
- // Catch the interrupt handler to shut down
- signal(SIGINT, CatchShutdown);
-@@ -2950,7 +2950,7 @@ int main(int argc,char *argv[]) {
- timetracker.RegisterTimer(datainterval * SERVER_TIMESLICES_SEC, NULL, 1, &ExportSyncEvent, NULL);
- // Write waypoints if requested
- if (waypoint)
-- timetracker.RegisterTimer(decay * SERVER_TIMESLICES_SEC, NULL, 1, &WaypointSyncEvent, NULL);
-+ timetracker.RegisterTimer(rdecay * SERVER_TIMESLICES_SEC, NULL, 1, &WaypointSyncEvent, NULL);
- // Channel hop if requested
- if (channel_hop) {
- if (channel_dwell)
-@@ -3175,7 +3175,7 @@ daemon_parent_cleanup:
- num_networks = tracker.FetchNumNetworks();
-
- if (tracker.FetchNumPackets() != num_packets) {
-- if (cur_time - last_click >= decay && sound == 1) {
-+ if (cur_time - last_click >= rdecay && sound == 1) {
- if (tracker.FetchNumPackets() - num_packets >
- tracker.FetchNumDropped() + localdropnum - num_dropped) {
- sound = PlaySound("traffic");
Index: patches/patch-macaddr_h
===================================================================
RCS file: /cvs/ports/net/kismet/patches/patch-macaddr_h,v
retrieving revision 1.3
diff -u -r1.3 patch-macaddr_h
--- patches/patch-macaddr_h 17 May 2017 16:03:32 -0000 1.3
+++ patches/patch-macaddr_h 30 Jan 2019 21:54:27 -0000
@@ -1,46 +1,16 @@
-$OpenBSD: patch-macaddr_h,v 1.3 2017/05/17 16:03:32 espie Exp $
+$OpenBSD$
+
+silence clan warning

Index: macaddr.h
--- macaddr.h.orig
+++ macaddr.h
-@@ -22,6 +22,7 @@
- #include "config.h"
-
- #include <stdio.h>
-+#include <stdlib.h>
- #include <ctype.h>
- #include <sys/time.h>
- #include <sys/resource.h>
-@@ -46,7 +47,7 @@
- #define MAC_STR_LEN ((MAC_LEN * 2) + 6)
-
- // A packet MAC address
--typedef struct mac_addr {
-+struct mac_addr {
- uint64_t longmac;
- uint64_t longmask;
- int error;
-@@ -73,7 +74,7 @@ typedef struct mac_addr {
- longmac |= (uint64_t) bs_in[5] << ((MAC_LEN - 5 - 1) * 8);
-
- // If it has a mask component, get that
-- char *in_mask = strchr(in, '/');
-+ const char *in_mask = strchr(in, '/');
- if (in_mask != NULL) {
- longmask = 0;
-
-@@ -277,12 +278,12 @@ typedef struct mac_addr {
- template<class T>
- class macmap {
- protected:
-- typedef struct mask_vec_content {
-+ struct mask_vec_content {
- mac_addr mac;
- T value;
- };
+@@ -185,7 +185,7 @@ struct mac_addr {
+ }

-- typedef struct mask_vec_offsets {
-+ struct mask_vec_offsets {
- unsigned int first;
- unsigned int last;
- };
+ inline mac_addr(int in) {
+- in = in; // Silence gcc
++ static_cast<void>(in);
+ longmac = 0;
+ longmask = 0;
+ error = 0;
Index: patches/patch-man_gpsmap_1
===================================================================
RCS file: patches/patch-man_gpsmap_1
diff -N patches/patch-man_gpsmap_1
--- patches/patch-man_gpsmap_1 27 Jun 2008 22:10:14 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-man_gpsmap_1,v 1.3 2008/06/27 22:10:14 kili Exp $
-
---- man/gpsmap.1.orig Thu Apr 1 00:15:23 2004
-+++ man/gpsmap.1 Sat Jun 21 18:26:10 2008
-@@ -67,7 +67,10 @@ sample points.
- .TP
- .B
- \fB-S\fP, \fB--map-source\fP SOURCE
--Source to download maps from (-1 = Null; 0 = Mapblast; 1 = MapPoint(broken); 2 = Terraserver; 3 = Tiger Census; 4 = Earthamap; 5 = Terraserver Topographic). Default: 4
-+Source to download maps from (-1 = Null; 0 = Mapblast; 1 = MapPoint(broken);
-+2 = Terraserver(broken); 3 = Tiger Census; 4 = Earthamap(broken);
-+5 = Terraserver Topographic(broken); 6 = Expedia; 7 = OpenStreetMap).
-+Default: -1.
- .TP
- .B
- \fB-D\fP, \fB--keep-gif\fP
Index: patches/patch-man_kismet_drone_conf_5
===================================================================
RCS file: patches/patch-man_kismet_drone_conf_5
diff -N patches/patch-man_kismet_drone_conf_5
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-man_kismet_drone_conf_5 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: man/kismet_drone.conf.5
+--- man/kismet_drone.conf.5.orig
++++ man/kismet_drone.conf.5
+@@ -6,7 +6,7 @@
+ .SH DESCRIPTION
+ kismet_drone uses a minimalized configuration file, similar in options to the
+ main kismet server configuration file. By default, the drone config is in
+-/usr/local/etc/kismet.conf. A default configuration is included with Kismet but
++${SYSCONFDIR}/kismet/kismet.conf. A default configuration is included with Kismet but
+ it is likely you will need to modify it to suit your hardware and preferences.
+ .SH CONFIGURATION FILE FORMAT
+ All entries are of the format directive = value
Index: patches/patch-netracker_h
===================================================================
RCS file: patches/patch-netracker_h
diff -N patches/patch-netracker_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-netracker_h 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+
+it's forward declared twice
+
+Index: netracker.h
+--- netracker.h.orig
++++ netracker.h
+@@ -306,9 +306,6 @@ class Netracker { (public)
+ int dirty;
+ };
+
+- // Fwd def for our map
+- class tracked_client;
+-
+ class ssid_alert_data {
+ public:
+ ssid_alert_data() {
Index: patches/patch-packet_h
===================================================================
RCS file: patches/patch-packet_h
diff -N patches/patch-packet_h
--- patches/patch-packet_h 17 May 2017 16:03:32 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
-$OpenBSD: patch-packet_h,v 1.3 2017/05/17 16:03:32 espie Exp $
-
-Index: packet.h
---- packet.h.orig
-+++ packet.h
-@@ -54,7 +54,7 @@
- #define MAC_STR_LEN ((MAC_LEN * 2) + 6)
-
- // Parmeters to the packet info
--typedef struct packet_parm {
-+struct packet_parm {
- int fuzzy_crypt;
- int fuzzy_decode;
- };
-@@ -295,7 +295,7 @@ typedef struct {
- } cdp_proto_element;
-
- // Info about a protocol
--typedef struct proto_info {
-+struct proto_info {
- protocol_info_type type;
-
- uint8_t source_ip[4];
Index: patches/patch-packetracker_cc
===================================================================
RCS file: patches/patch-packetracker_cc
diff -N patches/patch-packetracker_cc
--- patches/patch-packetracker_cc 17 May 2017 16:03:32 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,70 +0,0 @@
-$OpenBSD: patch-packetracker_cc,v 1.3 2017/05/17 16:03:32 espie Exp $
-
-Index: packetracker.cc
---- packetracker.cc.orig
-+++ packetracker.cc
-@@ -1194,7 +1194,7 @@ void Packetracker::ProcessDataPacket(kis_packet *packe
- }
-
- unsigned int ipdata_dirty = 0;
-- char *means = NULL;
-+ const char *means = NULL;
-
- if (info->proto.type == proto_dhcp_server &&
- (client->ipdata.atype < address_dhcp ||
-@@ -1294,7 +1294,7 @@ void Packetracker::ProcessDataPacket(kis_packet *packe
- // Handle netstumbler packets
-
- if (alertracker->PotentialAlert(arefs[NETSTUMBLER_AREF]) > 0) {
-- char *nsversion;
-+ const char *nsversion;
-
- switch (info->proto.prototype_extra) {
- case 22:
-@@ -1320,8 +1320,8 @@ void Packetracker::ProcessDataPacket(kis_packet *packe
- info->proto.type == proto_ttls || info->proto.type == proto_tls) {
- // Handle EAP packets
-
-- char *eapcode;
-- char *eaptype;
-+ const char *eapcode;
-+ const char *eaptype;
-
- switch (info->proto.prototype_extra) {
- case EAP_CODE_REQUEST:
-@@ -1373,7 +1373,7 @@ void Packetracker::ProcessDataPacket(kis_packet *packe
- } else if (info->proto.type == proto_isakmp) {
- // Handle ISAKMP traffic
-
-- char *isakmpcode;
-+ const char *isakmpcode;
- switch (info->proto.prototype_extra) {
- case ISAKMP_EXCH_NONE:
- isakmpcode = "NONE";
-@@ -2394,7 +2394,7 @@ int Packetracker::WriteXMLNetworks(string in_fname) {
- }
-
- if (net->ipdata.atype > address_factory) {
-- char *addrtype;
-+ const char *addrtype;
- switch (net->ipdata.atype) {
- case address_dhcp:
- addrtype = "dhcp";
-@@ -2425,7 +2425,7 @@ int Packetracker::WriteXMLNetworks(string in_fname) {
- for (unsigned int cltr = 0; cltr < net->client_vec.size(); cltr++) {
- wireless_client *cli = net->client_vec[cltr];
-
-- char *clitype;
-+ const char *clitype;
- switch (cli->type) {
- case client_fromds:
- clitype = "fromds";
-@@ -2527,7 +2527,7 @@ int Packetracker::WriteXMLNetworks(string in_fname) {
-
-
- if (cli->ipdata.atype > address_factory) {
-- char *addrtype;
-+ const char *addrtype;
- switch (cli->ipdata.atype) {
- case address_dhcp:
- addrtype = "dhcp";
Index: patches/patch-packetsource_bsdrt_cc
===================================================================
RCS file: patches/patch-packetsource_bsdrt_cc
diff -N patches/patch-packetsource_bsdrt_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-packetsource_bsdrt_cc 30 Jan 2019 21:54:27 -0000
@@ -0,0 +1,39 @@
+$OpenBSD$
+
+
+IFM_MAKEMODE is not defined on OpenBSD, just copying it from Linux
+doesn't help, since our IFM_MSHIFT etc. operate on ULL, but mode
+apparently only is of type int
+
+Index: packetsource_bsdrt.cc
+--- packetsource_bsdrt.cc.orig
++++ packetsource_bsdrt.cc
+@@ -138,7 +138,7 @@ int Radiotap_BSD_Controller::GetMediaOpt(int& options,
+ int Radiotap_BSD_Controller::SetMediaOpt(int options, int mode) {
+ struct ifmediareq ifmr;
+ struct ifreq ifr;
+- int *mwords;
++ uint64_t *mwords;
+
+ if (CheckSocket() == 0)
+ return 0;
+@@ -160,7 +160,7 @@ int Radiotap_BSD_Controller::SetMediaOpt(int options,
+ return 0;
+ }
+
+- mwords = new int[ifmr.ifm_count];
++ mwords = new uint64_t[ifmr.ifm_count];
+ if (mwords == NULL) {
+ _MSG("BSD interface control cannot malloc interface array, out of "
+ "memory or other badness.", MSGFLAG_PRINTERROR);
+@@ -179,6 +179,10 @@ int Radiotap_BSD_Controller::SetMediaOpt(int options,
+ memset(&ifr, 0, sizeof(ifr));
+ strncpy(ifr.ifr_name, dev.c_str(), sizeof(ifr.ifr_name));
+ ifr.ifr_media = (ifmr.ifm_current &~ IFM_OMASK) | options;
++#ifndef IFM_MAKEMODE
++#define IFM_MAKEMODE(mode) \
++ ((((unsigned long long)mode) << IFM_MSHIFT) & IFM_MMASK)
++

No comments:

Post a Comment