aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--databases/Makefile1
-rw-r--r--databases/mysqlsniffer/Makefile27
-rw-r--r--databases/mysqlsniffer/distinfo3
-rw-r--r--databases/mysqlsniffer/files/patch-misc.c10
-rw-r--r--databases/mysqlsniffer/files/patch-mysqlsniffer.c10
-rw-r--r--databases/mysqlsniffer/files/patch-packet_handlers.c10
-rw-r--r--databases/mysqlsniffer/pkg-descr6
7 files changed, 67 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile
index 6ef1b9ad79b9..147400b2bf27 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -232,6 +232,7 @@
SUBDIR += mysqlman
SUBDIR += mysqlreport
SUBDIR += mysqlsla
+ SUBDIR += mysqlsniffer
SUBDIR += mysqltcl
SUBDIR += mysqltuner
SUBDIR += mytop
diff --git a/databases/mysqlsniffer/Makefile b/databases/mysqlsniffer/Makefile
new file mode 100644
index 000000000000..22f0fc443bf9
--- /dev/null
+++ b/databases/mysqlsniffer/Makefile
@@ -0,0 +1,27 @@
+# New ports collection makefile for: mysqlsniffer
+# Date created: 26 May 2010
+# Whom: Frederic Hardy <frederic.hardy@mageekbox.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= mysqlsniffer
+PORTVERSION= 1.2
+CATEGORIES= databases
+MASTER_SITES= http://hackmysql.com/code/
+DISTNAME= mysqlsniffer
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= frederic.hardy@mageekbox.net
+COMMENT= Tcpdump clone specifically for MySQL
+
+NO_WRKSUBDIR= yes
+PLIST_FILES= bin/mysqlsniffer
+
+do-build:
+ ${CC} -lpcap -o ${WRKSRC}/${PORTNAME} ${WRKSRC}/mysqlsniffer.c ${WRKSRC}/packet_handlers.c ${WRKSRC}/misc.c
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/databases/mysqlsniffer/distinfo b/databases/mysqlsniffer/distinfo
new file mode 100644
index 000000000000..d3f641a8788f
--- /dev/null
+++ b/databases/mysqlsniffer/distinfo
@@ -0,0 +1,3 @@
+MD5 (mysqlsniffer.tgz) = 816575bfd06179192468a15dd3d26cdb
+SHA256 (mysqlsniffer.tgz) = 7267c3babbc0cad5714c466da6cffdd0f7a5c9bd49075ad00cb62f564cff2c35
+SIZE (mysqlsniffer.tgz) = 15782
diff --git a/databases/mysqlsniffer/files/patch-misc.c b/databases/mysqlsniffer/files/patch-misc.c
new file mode 100644
index 000000000000..fbe10e2ec0c3
--- /dev/null
+++ b/databases/mysqlsniffer/files/patch-misc.c
@@ -0,0 +1,10 @@
+--- misc.c.ori 2006-08-18 16:37:02.000000000 +0200
++++ misc.c 2010-05-26 14:01:16.000000000 +0200
+@@ -4,6 +4,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <ctype.h>
++#include <sys/types.h>
+ #include "user_defines.h"
+ #include "mysql_defines.h"
+ #include "misc.h"
diff --git a/databases/mysqlsniffer/files/patch-mysqlsniffer.c b/databases/mysqlsniffer/files/patch-mysqlsniffer.c
new file mode 100644
index 000000000000..0de93db9e578
--- /dev/null
+++ b/databases/mysqlsniffer/files/patch-mysqlsniffer.c
@@ -0,0 +1,10 @@
+--- mysqlsniffer.c.ori 2006-08-18 16:52:52.000000000 +0200
++++ mysqlsniffer.c 2010-05-26 14:01:24.000000000 +0200
+@@ -31,6 +31,7 @@
+ #include <getopt.h>
+ #include <signal.h>
+ #include <sys/socket.h>
++#include <sys/types.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include "user_defines.h"
diff --git a/databases/mysqlsniffer/files/patch-packet_handlers.c b/databases/mysqlsniffer/files/patch-packet_handlers.c
new file mode 100644
index 000000000000..c26706d305eb
--- /dev/null
+++ b/databases/mysqlsniffer/files/patch-packet_handlers.c
@@ -0,0 +1,10 @@
+--- packet_handlers.c.ori 2006-08-18 16:37:02.000000000 +0200
++++ packet_handlers.c 2010-05-26 14:01:30.000000000 +0200
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/types.h>
+ #include "mysql_defines.h"
+ #include "user_defines.h"
+ #include "state_map.h"
diff --git a/databases/mysqlsniffer/pkg-descr b/databases/mysqlsniffer/pkg-descr
new file mode 100644
index 000000000000..106a00c090a6
--- /dev/null
+++ b/databases/mysqlsniffer/pkg-descr
@@ -0,0 +1,6 @@
+mysqlsniffer is a tcpdump clone specifically for dumping/sniffing/watching MySQL
+network protocol traffic over TCP/IP networks.
+mysqlsniffer is coded in C using the pcap library and works with MySQL version
+4.0 and newer. mysqlsniffer is the only MySQL-specific network sniffer.
+
+WWW: http://hackmysql.com/mysqlsniffer