From b4d8ffcf10db50ce1b5b3f76633c4ac79518e31d5b873e385e779e874b340deb Mon Sep 17 00:00:00 2001 From: Pascal Bleser Date: Thu, 31 Dec 2009 10:10:40 +0000 Subject: [PATCH] 0.5.4 OBS-URL: https://build.opensuse.org/package/show/network:utilities/netsniff-ng?expand=0&rev=1 --- .gitattributes | 23 ++++++++ .gitignore | 1 + netsniff-ng-0.5.4.tar.bz2 | 3 + netsniff-ng-fix_printf_format.patch | 33 +++++++++++ netsniff-ng.changes | 5 ++ netsniff-ng.spec | 87 +++++++++++++++++++++++++++++ 6 files changed, 152 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 netsniff-ng-0.5.4.tar.bz2 create mode 100644 netsniff-ng-fix_printf_format.patch create mode 100644 netsniff-ng.changes create mode 100644 netsniff-ng.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/netsniff-ng-0.5.4.tar.bz2 b/netsniff-ng-0.5.4.tar.bz2 new file mode 100644 index 0000000..15c4462 --- /dev/null +++ b/netsniff-ng-0.5.4.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b27ec0bec6f6e22b066183b37f59bf9714656cbf94e0bca61d1becd5893f0738 +size 124696 diff --git a/netsniff-ng-fix_printf_format.patch b/netsniff-ng-fix_printf_format.patch new file mode 100644 index 0000000..6454035 --- /dev/null +++ b/netsniff-ng-fix_printf_format.patch @@ -0,0 +1,33 @@ +--- src/netsniff-ng.c.orig 2009-12-31 11:00:20.000000000 +0100 ++++ src/netsniff-ng.c 2009-12-31 11:02:16.000000000 +0100 +@@ -139,16 +139,16 @@ + */ + info("stats summary:\n"); + info("--------------------------------------------------------------------------------------------\n"); +- info("elapsed time: %llu d, %llu h, %llu min, %llu s, %llu ns\n", d_day, ++ info("elapsed time: %zu d, %zu h, %zu min, %zu s, %zu ns\n", d_day, + d_h, d_min, d_sec, d_nsec); + info("-----------+--------------------------+--------------------------+--------------------------\n"); + info(" | per sec | per min | total \n"); + info("-----------+--------------------------+--------------------------+--------------------------\n"); +- info(" frames | %24llu | %24llu | %24llu \n", ++ info(" frames | %24zu | %24zu | %24zu \n", + netstat.s_per_sec.frames, netstat.s_per_min.frames, + netstat.total.frames); + info("-----------+--------------------------+--------------------------+--------------------------\n"); +- info(" in B | %24llu | %24llu | %24llu \n", ++ info(" in B | %24zu | %24zu | %24zu \n", + netstat.s_per_sec.bytes, netstat.s_per_min.bytes, + netstat.total.bytes); + info(" in KB | %24llu | %24llu | %24llu \n", +@@ -516,8 +516,8 @@ + * on 32 and 64 bit arch w/o gcc warnings + */ + +- info("captured frames: %llu, " +- "captured bytes: %llu [%llu KB, %llu MB, %llu GB]\n", ++ info("captured frames: %zu, " ++ "captured bytes: %zu [%zu KB, %zu MB, %zu GB]\n", + netstat.total.frames, netstat.total.bytes, + netstat.total.bytes / 1024, + netstat.total.bytes / (1024 * 1024), diff --git a/netsniff-ng.changes b/netsniff-ng.changes new file mode 100644 index 0000000..27c8e66 --- /dev/null +++ b/netsniff-ng.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Thu Dec 31 10:09:24 UTC 2009 - pascal.bleser@opensuse.org + +- new package (0.5.4) + diff --git a/netsniff-ng.spec b/netsniff-ng.spec new file mode 100644 index 0000000..52cffec --- /dev/null +++ b/netsniff-ng.spec @@ -0,0 +1,87 @@ +# norootforbuild + +Name: netsniff-ng +Version: 0.5.4 +Release: 0 +Summary: High Performance Network Sniffer for Packet Inspection +# http://netsniff-ng.googlecode.com/files/netsniff-ng-%{version}.tar.gz +Source: netsniff-ng-%{version}.tar.bz2 +Patch1: netsniff-ng-fix_printf_format.patch +URL: http://code.google.com/p/netsniff-ng/ +Group: Productivity/Networking/Diagnostic +License: GNU General Public License version 2 or later (GPL v2 or later) +BuildRoot: %{_tmppath}/build-%{name}-%{version} +BuildRequires: gcc make glibc-devel +BuildRequires: autoconf automake libtool +%if 0%{?suse_version} >= 1030 +BuildRequires: licenses +Requires: licenses +%endif + +%description +netsniff-ng is a high performance Linux network sniffer for packet inspection. +Basically, it is similar to tcpdump, but it doesn't need syscalls for fetching +packets. Instead, it uses an memory mapped area within kernel space for +accessing packets without the need of copying them to userspace ('zero-copy' +mechanism). It can be used for protocol analysis and reverse engineering, +network debugging, measurement of performance throughput, or network statistics +creation of incoming packets on central network nodes like routers or +firewalls. + + + + +Authors: +-------- + Daniel Borkmann + Emmanuel Roullit + +%if 0%{?opensuse_bs} +%debug_package +%endif +%prep +%setup -q +%patch1 + +%build +pushd src +%__make %{?jobs:-j%{jobs}} \ + CC="%__cc" \ + CFLAGS="-Wall %{optflags}" \ + BINDIR="%{_sbindir}" \ + ETCDIR="%{_sysconfdir}" \ + MANDIR="%{_mandir}/man8" +popd #src + +%install +pushd src +%makeinstall \ + CC="%__cc" \ + CFLAGS="-Wall %{optflags}" \ + BINDIR="%{_sbindir}" \ + ETCDIR="%{_sysconfdir}" \ + MANDIR="%{_mandir}/man8" +popd #src + +%__chmod 0644 "%{buildroot}%{_mandir}"/*/* + +h=/usr/share/doc/licenses/md5/$(md5sum COPYING|cut -f1 -d" ") +test -e "$h" && %__ln_s -f "$h" . + +%clean +%__rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%doc AUTHORS Changelog COPYING CREDITS README TODO +%doc examples +%config %{_sysconfdir}/netsniff-ng +%{_sbindir}/netsniff-ng +%doc %{_mandir}/man8/netsniff-ng.8* + +%changelog +# vim: set sw=3 ts=3 noet: +# Local Variables: +# mode: rpm-spec +# tab-width: 3 +# End: