Package Details: dummynet 20130607-10

Git Clone URL: https://aur.archlinux.org/dummynet.git (read-only)
Package Base: dummynet
Description: A live network emulation tool, originally designed for testing networking protocols, and since then used for a variety of applications including bandwidth management.
Upstream URL: http://info.iet.unipi.it/~luigi/dummynet/
Licenses: BSD
Submitter: said
Maintainer: gamanakis
Last Packager: gamanakis
Votes: 3
Popularity: 0.001296
First Submitted: 2013-01-25 16:58
Last Updated: 2015-09-28 17:52

Latest Comments

gamanakis commented on 2015-07-17 17:23

Since linux-4.1.2 there is a problem with the ipv6.h dependency of inet_hashtables.h and it doesn't compile.

gamanakis commented on 2015-01-20 13:44

dummynet-lts as separate package submitted

gamanakis commented on 2015-01-20 13:12

I updated the PGKBUILD file so that the extramodules directory is handled better.
It is recommended to install manually, without using "yaourt".
1) cower -d dummynet
2) cd dummynet; makepkg
3) pacman -U *.pkg.tar.xz

gamanakis commented on 2015-01-20 13:10

I updated the PGKBUILD file.
It is recommended to install manually, without using "yaourt".
1) cower -d dummynet
2) cd dummynet; makepkg
3) pacman -U *.pkg.tar.xz

gamanakis commented on 2015-01-19 17:59

Because the package consists of a userland-utility and a kernel-module please avoid yaourt and install manually. Use cower to download and extract the tarball with "cower -d dummynet", then use "makepkg -s", and install with "pacman -U *pkg.tar.xz".

/usr/lib/modules/extramodules-`uname -r`/ipfw_mod.ko is not a standard directory in Archlinux.

gamanakis commented on 2015-01-19 17:58

Because the package consists of a userland-utility and a kernel-module please avoid yaourt and install manually. Use cower to download and extract the tarball, then use "makepkg -s", and install with "pacman -U *pkg.tar.xz".

/usr/lib/modules/extramodules-`uname -r`/ipfw_mod.ko is not a standard directory in Archlinux.

emctoo commented on 2015-01-19 16:06

try to install with yaourt, get error in last step:

...
error: failed to commit transaction (conflicting files)
dummynet: /usr/lib/modules/3.18.2-2-ARCH/extramodules exists in filesystem
Errors occurred, no packages were upgraded.

Maybe fail to install /usr/lib/modules/3.18.2-2-ARCH/extramodules/ipfw_mod.ko, found that directory is a symbol link.

So just change the install line:

install -Dm755 ipfw_mod.ko $pkgdir/usr/lib/modules/extramodules-`uname -r`/ipfw_mod.ko

Now it success to install, hope it helps.

emctoo commented on 2015-01-19 16:04

try to install with yaourt, get error in last step:

...
error: failed to commit transaction (conflicting files)
dummynet: /usr/lib/modules/3.18.2-2-ARCH/extramodules exists in filesystem
Errors occurred, no packages were upgraded.

Maybe fail to install /usr/lib/modules/3.18.2-2-ARCH/extramodules/ipfw_mod.ko, found that directory is a symbol link.

and this fix it (simply modify the directory, any side-effect?):

- install -Dm755 ipfw_mod.ko $pkgdir/usr/lib/modules/`uname -r`/extramodules/ipfw_mod.ko
+ install -Dm755 ipfw_mod.ko $pkgdir/usr/lib/modules/extramodules-`uname -r`/ipfw_mod.ko

Now it success to install, hope it helps.

emctoo commented on 2015-01-19 16:03

try to install with yaourt, get error in last step:

...
error: failed to commit transaction (conflicting files)
dummynet: /usr/lib/modules/3.18.2-2-ARCH/extramodules exists in filesystem
Errors occurred, no packages were upgraded.

Maybe fail to install /usr/lib/modules/3.18.2-2-ARCH/extramodules/ipfw_mod.ko, found that directory is a symbol link.

and this fix it (simply modify the directory, any side-effect?):

- install -Dm755 ipfw_mod.ko $pkgdir/usr/lib/modules/`uname -r`/extramodules/ipfw_mod.ko
+ install -Dm755 ipfw_mod.ko $pkgdir/usr/lib/modules/extramodules-`uname -r`/ipfw_mod.ko

Now it success to install, hope it helps.

emctoo commented on 2015-01-19 16:02

try to install with yaourt, get error in last step:

...
error: failed to commit transaction (conflicting files)
dummynet: /usr/lib/modules/3.18.2-2-ARCH/extramodules exists in filesystem
Errors occurred, no packages were upgraded.

Maybe fail to install /usr/lib/modules/3.18.2-2-ARCH/extramodules/ipfw_mod.ko, found that directory is a symbol link.

and this fix it (simply modify the directory, any side-effect?):

- install -Dm755 ipfw_mod.ko $pkgdir/usr/lib/modules/`uname -r`/extramodules/ipfw_mod.ko
+ - install -Dm755 ipfw_mod.ko $pkgdir/usr/lib/modules/extramodules-`uname -r`/ipfw_mod.ko

Now it success to install.

gamanakis commented on 2014-12-08 20:15

Status on 08.12.2014: Dummynet compiles and works correctly, tested on linux-lts (3.14) and linux (3.17).

gamanakis commented on 2014-08-05 22:46

The actual PKGBUILD for the submitted patch for 3.14 kernels. Confirmed working with 3.14.15-lts.

# Contributor: gamanakis

pkgname=dummynet
pkgver=20120812
pkgrel=1
pkgdesc="A live network emulation tool, originally designed for testing networking protocols, and since then used for a variety of applications including bandwidth management."
arch=('i686' 'x86_64')
license=('GPL')
source=('http://info.iet.unipi.it/~luigi/doc/20130607-ipfw3.tgz'
'p.patch')
md5sums=('004e65e6d545a89c4dcc3e741e287444'
'a993c4ddd47d9e6d49e292dbc9ec16a9')
url="http://info.iet.unipi.it/~luigi/dummynet/"

build() {
cd $srcdir/ipfw3-2012
patch -p1 < $srcdir/p.patch
make
}

package() {
cd $srcdir/ipfw3-2012/ipfw
install -Dm755 ipfw $pkgdir/usr/bin/ipfw
cd $srcdir/ipfw3-2012/kipfw-mod
install -Dm755 ipfw_mod.ko $pkgdir/usr/lib/modules/`uname -r`/extramodules/ipfw_mod.ko
}

gamanakis commented on 2014-08-05 22:44

First the patch in order to work with 3.14 kernels:

diff -rupN ipfw3-2012.org/kipfw/ipfw2_mod.c ipfw3-2012/kipfw/ipfw2_mod.c
--- ipfw3-2012.org/kipfw/ipfw2_mod.c 2013-05-02 12:04:52.000000000 +0200
+++ ipfw3-2012/kipfw/ipfw2_mod.c 2014-08-05 23:56:09.897299579 +0200
@@ -218,7 +218,7 @@ ipfw_ctl_h(struct sockopt *s, int cmd, i
struct thread t;
int ret = EINVAL;

- memset(s, 0, sizeof(s));
+ memset(s, 0, sizeof(*s));
s->sopt_name = cmd;
s->sopt_dir = dir;
s->sopt_valsize = len;
@@ -466,7 +466,7 @@ static struct nf_sockopt_ops ipfw_sockop
* so we have an #ifdef to set the proper argument type.
*/
static unsigned int
-call_ipfw(unsigned int hooknum,
+call_ipfw(const struct nf_hook_ops *ops,
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) // in 2.6.22 we have **
struct sk_buff **skb,
#else
@@ -475,7 +475,7 @@ call_ipfw(unsigned int hooknum,
const struct net_device *in, const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
- (void)hooknum; (void)skb; (void)in; (void)out; (void)okfn; /* UNUSED */
+ (void)ops; (void)skb; (void)in; (void)out; (void)okfn; /* UNUSED */
return NF_QUEUE;
}

@@ -724,8 +724,8 @@ linux_lookup(const int proto, const __be
#define _CURR_GID f_gid
#else /* 2.6.29 and above */
/* use the current's file access real uid/gid */
-#define _CURR_UID f_cred->fsuid
-#define _CURR_GID f_cred->fsgid
+#define _CURR_UID f_cred->fsuid.val
+#define _CURR_GID f_cred->fsgid.val
#endif

#define GOOD_STATES ( \
@@ -818,18 +818,22 @@ nf_unregister_hooks(struct nf_hook_ops *

static struct nf_hook_ops ipfw_ops[] __read_mostly = {
{
+ { NULL, NULL },
.hook = call_ipfw,
+ .owner = THIS_MODULE,
+ NULL,
.pf = PF_INET,
.hooknum = IPFW_HOOK_IN,
.priority = NF_IP_PRI_FILTER,
- SET_MOD_OWNER
},
{
+ { NULL, NULL },
.hook = call_ipfw,
+ .owner = THIS_MODULE,
+ NULL,
.pf = PF_INET,
- .hooknum = NF_IP_POST_ROUTING,
+ .hooknum = IPFW_HOOK_IN,
.priority = NF_IP_PRI_FILTER,
- SET_MOD_OWNER
},
};
#endif /* __linux__ */
diff -rupN ipfw3-2012.org/kipfw/missing.h ipfw3-2012/kipfw/missing.h
--- ipfw3-2012.org/kipfw/missing.h 2013-05-02 12:04:52.000000000 +0200
+++ ipfw3-2012/kipfw/missing.h 2014-08-05 22:49:48.250560261 +0200
@@ -334,6 +334,14 @@ struct ifaltq {
#define if_xname name
#define if_snd XXX
/* search local the ip addresses, used for the "me" keyword */
+
+struct ptr_heap {
+ void ** ptrs;
+ int max;
+ int size;
+ int (*gt)(void *, void *);
+};
+
#include <linux/inetdevice.h>

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
diff -rupN ipfw3-2012.org/sys/netinet/ipfw/ip_dummynet.c ipfw3-2012/sys/netinet/ipfw/ip_dummynet.c
--- ipfw3-2012.org/sys/netinet/ipfw/ip_dummynet.c 2012-08-20 17:43:52.000000000 +0200
+++ ipfw3-2012/sys/netinet/ipfw/ip_dummynet.c 2014-08-05 22:56:29.360260471 +0200
@@ -635,7 +635,7 @@ fsk_detach(struct dn_fsk *fs, int flags)
fs->sched->fp->free_fsk(fs);
fs->sched = NULL;
if (flags & DN_DELETE_FS) {
- bzero(fs, sizeof(fs)); /* safety */
+ bzero(fs, sizeof(*fs)); /* safety */
free(fs, M_DUMMYNET);
dn_cfg.fsk_count--;
} else {

Anonymous comment on 2013-07-10 14:41

Fails to build for me.

==> Making package: dummynet 20120812-1 (Wed Jul 10 09:33:50 CDT 2013)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading 20120812-ipfw3.tgz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1917k 100 1917k 0 0 9665 0 0:03:23 0:03:23 --:--:-- 13565
==> Validating source files with md5sums...
20120812-ipfw3.tgz ... Passed
==> Extracting sources...
-> Extracting 20120812-ipfw3.tgz with bsdtar
==> Starting build()...
grep: /lib/modules/3.9.9-1-ARCH/build/include/linux/version.h: No such file or directory
make[1]: Entering directory `/tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod'
Makefile:267: "---- Perhaps you miss a (cd /lib/modules/3.9.9-1-ARCH/build; make oldconfig; make prepare; make scripts)"
/bin/sh: line 0: [: : integer expression expected
make[1]: Leaving directory `/tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod'
grep: /lib/modules/3.9.9-1-ARCH/build/include/linux/version.h: No such file or directory
make[1]: Entering directory `/tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod'
Makefile:267: "---- Perhaps you miss a (cd /lib/modules/3.9.9-1-ARCH/build; make oldconfig; make prepare; make scripts)"
/bin/sh: line 0: [: : integer expression expected
make -C /lib/modules/3.9.9-1-ARCH/build V= M=`pwd` modules
make[2]: Entering directory `/usr/src/linux-3.9.9-1-ARCH'
grep: /lib/modules/3.9.9-1-ARCH/build/include/linux/version.h: No such file or directory
/tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/Makefile:267: "---- Perhaps you miss a (cd /lib/modules/3.9.9-1-ARCH/build; make oldconfig; make prepare; make scripts)"
/bin/sh: line 0: [: : integer expression expected
CC [M] /tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/ip_fw2.o
CC [M] /tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/ip_fw_pfil.o
CC [M] /tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/ip_fw_sockopt.o
CC [M] /tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/ip_fw_dynamic.o
CC [M] /tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/ip_fw_table.o
CC [M] /tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/ip_fw_log.o
CC [M] /tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/radix.o
CC [M] /tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/in_cksum.o
CC [M] /tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/ip_dummynet.o
In file included from <command-line>:0:0:
/tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/ip_dummynet.c: In function ‘fsk_detach’:
/tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/ip_dummynet.c:638:19: error: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
bzero(fs, sizeof(fs)); /* safety */
^
/tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/missing.h:138:34: note: in definition of macro ‘bzero’
#define bzero(s, n) memset(s, 0, n)
^
cc1: all warnings being treated as errors
make[3]: *** [/tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod/ip_dummynet.o] Error 1
make[2]: *** [_module_/tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod] Error 2
make[2]: Leaving directory `/usr/src/linux-3.9.9-1-ARCH'
make[1]: *** [kipfw] Error 2
make[1]: Leaving directory `/tmp/yaourt-tmp-root/aur-dummynet/src/ipfw3-2012/kipfw-mod'
make: *** [kipfw] Error 2
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Makepkg was unable to build dummynet.