Permalink
Browse files

Added initial version of dummynet to repository

  • Loading branch information...
1 parent a3c4ba1 commit f76ac3730d027d2a77fc01a86c2642e2b35ac369 Russ Lankenau committed Jun 5, 2012
Showing with 40,694 additions and 0 deletions.
  1. +11 −0 020-mips-hz1000.patch
  2. +54 −0 Makefile
  3. +80 −0 Makefile.openwrt
  4. +387 −0 README
  5. +27 −0 binary/README.txt
  6. BIN binary/cygwin1.dll
  7. BIN binary/ipfw.exe
  8. BIN binary/ipfw.sys
  9. +79 −0 binary/netipfw.inf
  10. +54 −0 binary/netipfw_m.inf
  11. +79 −0 binary/testme.bat
  12. BIN binary/wget.exe
  13. +347 −0 dummynet2/Makefile
  14. +548 −0 dummynet2/bsd_compat.c
  15. +67 −0 dummynet2/debug.c
  16. +550 −0 dummynet2/dn_heap.c
  17. +120 −0 dummynet2/dn_sched_fifo.c
  18. +864 −0 dummynet2/dn_sched_qfq.c
  19. +307 −0 dummynet2/dn_sched_rr.c
  20. +373 −0 dummynet2/dn_sched_wf2q.c
  21. +150 −0 dummynet2/in_cksum.c
  22. +1 −0 dummynet2/include/net/if.h
  23. +118 −0 dummynet2/include/net/pfil.h
  24. +170 −0 dummynet2/include/net/radix.h
  25. +33 −0 dummynet2/include/netgraph/ng_ipfw.h
  26. +46 −0 dummynet2/include/netinet/ip.h
  27. +58 −0 dummynet2/include/netinet/ip6.h
  28. +263 −0 dummynet2/include/netinet/ip_dummynet.h
  29. +579 −0 dummynet2/include/netinet/ip_fw.h
  30. +17 −0 dummynet2/include/netinet/ip_icmp.h
  31. +191 −0 dummynet2/include/netinet/ipfw/dn_heap.h
  32. +189 −0 dummynet2/include/netinet/ipfw/dn_sched.h
  33. +402 −0 dummynet2/include/netinet/ipfw/ip_dn_private.h
  34. +301 −0 dummynet2/include/netinet/ipfw/ip_fw_private.h
  35. +228 −0 dummynet2/include/netinet/tcp.h
  36. +4 −0 dummynet2/include/netinet/tcp_var.h
  37. +48 −0 dummynet2/include/netinet/udp.h
  38. +33 −0 dummynet2/include/sys/cdefs.h
  39. +26 −0 dummynet2/include/sys/kernel.h
  40. +59 −0 dummynet2/include/sys/malloc.h
  41. +232 −0 dummynet2/include/sys/mbuf.h
  42. +41 −0 dummynet2/include/sys/module.h
  43. +11 −0 dummynet2/include/sys/param.h
  44. +623 −0 dummynet2/include/sys/queue.h
  45. +7 −0 dummynet2/include/sys/syslog.h
  46. +121 −0 dummynet2/include/sys/systm.h
  47. +34 −0 dummynet2/include/sys/taskqueue.h
  48. +845 −0 dummynet2/ip_dn_glue.c
  49. +788 −0 dummynet2/ip_dn_io.c
  50. +2,296 −0 dummynet2/ip_dummynet.c
  51. +2,490 −0 dummynet2/ip_fw2.c
  52. +1,245 −0 dummynet2/ip_fw_dynamic.c
  53. +435 −0 dummynet2/ip_fw_log.c
  54. +304 −0 dummynet2/ip_fw_lookup.c
  55. +606 −0 dummynet2/ip_fw_nat.c
  56. +410 −0 dummynet2/ip_fw_pfil.c
  57. +1,287 −0 dummynet2/ip_fw_sockopt.c
  58. +282 −0 dummynet2/ip_fw_table.c
  59. +788 −0 dummynet2/ipfw2_mod.c
  60. +632 −0 dummynet2/md_win.c
  61. +1,481 −0 dummynet2/miniport.c
  62. +629 −0 dummynet2/missing.h
  63. +79 −0 dummynet2/netipfw.inf
  64. +54 −0 dummynet2/netipfw_m.inf
  65. +469 −0 dummynet2/passthru.c
  66. +500 −0 dummynet2/passthru.h
  67. +11 −0 dummynet2/precomp.h
  68. +1,670 −0 dummynet2/protocol.c
  69. +1,184 −0 dummynet2/radix.c
  70. +225 −0 dummynet2/winmissing.h
  71. +514 −0 glue.h
  72. +98 −0 ipfw/Makefile
  73. +1,405 −0 ipfw/dummynet.c
  74. +100 −0 ipfw/expand_number.c
  75. +823 −0 ipfw/glue.c
  76. +153 −0 ipfw/humanize_number.c
  77. +71 −0 ipfw/include/alias.h
  78. +82 −0 ipfw/include/net/if_dl.h
  79. +32 −0 ipfw/include/net/pfvar.h
  80. +29 −0 ipfw/include/timeconv.h
  81. +3,220 −0 ipfw/ipfw.8
  82. +3,942 −0 ipfw/ipfw2.c
  83. +288 −0 ipfw/ipfw2.h
  84. +501 −0 ipfw/ipv6.c
  85. +615 −0 ipfw/main.c
  86. +195 −0 ipfw/qsort.c
  87. +8 −0 ipfw/qsort_r.c
  88. +120 −0 ipfw/ws2_32.def
  89. +22 −0 planetlab/check_planetlab_sync
  90. +85 −0 planetlab/ipfw
  91. BIN planetlab/ipfw.8.gz
  92. +3 −0 planetlab/ipfw.cron
  93. +132 −0 planetlab/ipfwroot.spec
  94. +85 −0 planetlab/ipfwslice.spec
  95. +14 −0 planetlab/netconfig
  96. +5 −0 planetlab/planetlab-tags.mk
  97. +26 −0 planetlab/planetlab.mk
  98. +34 −0 planetlab/sample_hook
  99. BIN tcc-0.9.25-bsd.zip
  100. +232 −0 tcc_glue.h
  101. +53 −0 test/Makefile
  102. +72 −0 test/basic_ipfw.sh
  103. +157 −0 test/dn_test.h
  104. +636 −0 test/main.c
  105. +49 −0 test/mylist.h
  106. +162 −0 test/test_dn_heap.c
  107. +89 −0 test/test_dn_sched.c
View
@@ -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 */
View
@@ -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:
View
@@ -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.

0 comments on commit f76ac37

Please sign in to comment.