Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-stable
Commits
58ed9efb
Commit
58ed9efb
authored
Dec 09, 2008
by
Kevin Atkinson
Browse files
Added ipfw patch needed for backfill mod.
parent
49e3f711
Changes
2
Hide whitespace changes
Inline
Side-by-side
delay/freebsd/README
0 → 100644
View file @
58ed9efb
This directory contains changes to FreeBSD's dummynet. Primary to
add support for "backfill":
kmods - kernel or kernel module changes / additions
ipfw_mods - updates to the FreeBSD userland firewall control app
delay/freebsd/ipwf_mods/ipfw-FreeBSD-4.10.patch
0 → 100644
View file @
58ed9efb
--- sbin/ipfw.orig/ipfw.c Fri Sep 17 11:14:50 2004
+++ sbin/ipfw/ipfw.c Fri Dec 5 16:15:10 2008
@@ -946,6 +946,7 @@
" pipeconfig:\n"
" {bw|bandwidth} <number>{bit/s|Kbit/s|Mbit/s|Bytes/s|KBytes/s|MBytes/s}\n"
" {bw|bandwidth} interface_name\n"
+" backfill <number>{bit/s|Kbit/s|Mbit/s|Bytes/s|KBytes/s|MBytes/s}\n"
" delay <milliseconds>\n"
" queue <size>{packets|Bytes|KBytes}\n"
" plr <fraction>\n"
@@ -1564,6 +1565,27 @@
pipe.bandwidth *= 8;
}
if (pipe.bandwidth < 0)
+ errx(EX_DATAERR,
+ "bandwidth too large");
+ av += 2;
+ ac -= 2;
+ } else if (!strncmp(*av, "backfill", len)) {
+ pipe.backfill =
+ strtoul(av[1], &end, 0);
+ if (*end == 'K'
+ || *end == 'k') {
+ end++;
+ pipe.backfill *=
+ 1000;
+ } else if (*end == 'M') {
+ end++;
+ pipe.backfill *=
+ 1000000;
+ }
+ if (*end == 'B'
+ || !strncmp(end, "by", 2))
+ pipe.backfill *= 8;
+ if (pipe.backfill < 0)
errx(EX_DATAERR,
"bandwidth too large");
av += 2;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment