Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added initial version of dummynet to repository
- Loading branch information
Russ Lankenau
committed
Jun 5, 2012
1 parent
a3c4ba1
commit f76ac37
Showing
107 changed files
with
40,694 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- include/asm-mips/param_orig.h 2010-02-23 12:45:58.000000000 +0100 | ||
+++ include/asm-mips/param.h 2010-02-23 12:00:31.000000000 +0100 | ||
@@ -41,7 +41,7 @@ | ||
counter is increasing. This value is independent from the external value | ||
and can be changed in order to suit the hardware and application | ||
requirements. */ | ||
-# define HZ 100 | ||
+# define HZ 1000 | ||
# define hz_to_std(a) (a) | ||
|
||
#endif /* Not a DECstation */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# $Id: Makefile 5531 2010-02-26 14:45:45Z luigi $ | ||
# | ||
# Top level makefile for building ipfw kernel and userspace. | ||
# You can run it manually or also under the Planetlab build. | ||
# Planetlab wants also the 'install' target. | ||
# | ||
# To build on system with non standard Kernel sources or userland files, | ||
# you should run this with | ||
# | ||
# make KERNELPATH=/path/to/linux-2.x.y.z USRDIR=/path/to/usr | ||
# | ||
# We assume that $(USRDIR) contains include/ and lib/ used to build userland. | ||
|
||
DATE ?= $(shell date +%Y%m%d) | ||
SNAPSHOT_NAME=$(DATE)-ipfw3.tgz | ||
BINDIST=$(DATE)-dummynet-linux.tgz | ||
WINDIST=$(DATE)-dummynet-windows.zip | ||
_all: all | ||
|
||
clean distclean: | ||
echo target is $(@) | ||
(cd ipfw && $(MAKE) $(@) ) | ||
(cd dummynet2 && $(MAKE) $(@) ) | ||
|
||
all: | ||
echo target is $(@) | ||
(cd ipfw && $(MAKE) $(@) ) | ||
(cd dummynet2 && $(MAKE) $(@) ) | ||
# -- windows only | ||
- [ -f ipfw/ipfw.exe ] && cp ipfw/ipfw.exe binary/ipfw.exe | ||
- [ -f dummynet2/objchk_wxp_x86/i386/ipfw.sys ] && \ | ||
cp dummynet2/objchk_wxp_x86/i386/ipfw.sys binary/ipfw.sys | ||
|
||
snapshot: | ||
$(MAKE) distclean | ||
(cd ..; tar cvzhf /tmp/$(SNAPSHOT_NAME) --exclude .svn \ | ||
--exclude README.openwrt --exclude tags --exclude NOTES \ | ||
--exclude tcc-0.9.25-bsd \ | ||
--exclude original_passthru \ | ||
--exclude ipfw3.diff --exclude add_rules \ | ||
ipfw3 ) | ||
|
||
bindist: | ||
$(MAKE) clean | ||
$(MAKE) all | ||
tar cvzf /tmp/$(BINDIST) ipfw/ipfw ipfw/ipfw.8 dummynet2/ipfw_mod.ko | ||
|
||
windist: | ||
$(MAKE) clean | ||
-$(MAKE) all | ||
-rm /tmp/$(WINDIST) | ||
zip -r /tmp/$(WINDIST) binary -x \*.svn\* | ||
|
||
install: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Makefile to build the package in openwrt. | ||
# goes into package/ipfw3/Makefile | ||
# | ||
# Edit IPFW_DIR to point to the directory with the sources for ipfw | ||
|
||
IPFW_DIR := $(TOPDIR)/../ipfw3 | ||
|
||
include $(TOPDIR)/rules.mk | ||
include $(INCLUDE_DIR)/kernel.mk | ||
|
||
PKG_NAME:=kmod-ipfw3 | ||
PKG_RELEASE:=1 | ||
|
||
# MV is undefined | ||
MV ?= mv | ||
|
||
include $(INCLUDE_DIR)/package.mk | ||
|
||
# Description for the package. | ||
# The names KernelPackage/ipfw3 must match the arguments to the | ||
# call $(eval $(call KernelPackage,ipfw3)) used to build it | ||
|
||
|
||
define KernelPackage/ipfw3 | ||
SUBMENU:=Other modules | ||
TITLE:= IPFW and dummynet | ||
# FILES is what makes up the module, both kernel and userland | ||
# It must be in the KernelPackage section | ||
FILES := $(PKG_BUILD_DIR)/dummynet2/ipfw_mod.o $(PKG_BUILD_DIR)/ipfw/ipfw | ||
# AUTOLOAD:=$(call AutoLoad,80,ipfw_mod) | ||
endef | ||
|
||
define KernelPackage/ipfw3/description | ||
This package contains the ipfw and dummynet module | ||
endef | ||
|
||
# Standard entries for the openwrt builds: Build/Prepare and Build/Compile | ||
# Remember that commands must start with a tab | ||
|
||
# 'prepare' instructions for both kernel and userland | ||
# We copy the entire subtree, then build include_e/ which | ||
# contains empty headers used by the kernel sources. | ||
define Build/Prepare | ||
# $(warning Preparing ipfw sources) | ||
mkdir -p $(PKG_BUILD_DIR) | ||
$(CP) -Rp $(IPFW_DIR)/* $(PKG_BUILD_DIR)/ | ||
(cd $(PKG_BUILD_DIR)/ipfw && $(MAKE) include_e ) | ||
(cd $(PKG_BUILD_DIR)/dummynet2 && $(MAKE) include_e ) | ||
endef | ||
|
||
define Build/Compile | ||
# compile the kernel part for openwrt | ||
$(MAKE) -C "$(LINUX_DIR)" \ | ||
CROSS_COMPILE="$(TARGET_CROSS)" \ | ||
ARCH="$(LINUX_KARCH)" \ | ||
SUBDIRS="$(PKG_BUILD_DIR)/dummynet2" \ | ||
VER=openwrt modules | ||
# compile the userland part for openwrt | ||
$(MAKE) -C $(PKG_BUILD_DIR)/ipfw \ | ||
$(TARGET_CONFIGURE_OPTS) \ | ||
CFLAGS="$(TARGET_CFLAGS) -I./include_e -I./include -include ../glue.h -DNO_ALTQ" \ | ||
VER=openwrt all | ||
endef | ||
|
||
define Package/ipfw3-userland | ||
SECTION:=utils | ||
CATEGORY:=Utilities | ||
TITLE := /sbin/ipfw | ||
DESCRIPTION := This is the control program for ipfw and dummynet | ||
endef | ||
|
||
define Package/ipfw3-userland/install | ||
$(INSTALL_DIR) $(1) /sbin | ||
endef | ||
|
||
# XXX not entirely clear why the install entry for userland works, | ||
# given that /sbin/ipfw is in KernelPackage/ipfw3 | ||
|
||
$(eval $(call Package,ipfw3-userland)) | ||
$(eval $(call KernelPackage,ipfw3)) |
Oops, something went wrong.