summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_fw.h
diff options
context:
space:
mode:
authormelifaro <melifaro@FreeBSD.org>2013-03-20 10:35:33 +0000
committermelifaro <melifaro@FreeBSD.org>2013-03-20 10:35:33 +0000
commit31a6358fffd6950960c98280182bba118f5ac9f9 (patch)
tree44e82abbb64d1051fdaf7d30eff801b105e36c64 /sys/netinet/ip_fw.h
parentfde3650fd88d5b6ebbf80e8fdc864164130256ac (diff)
downloadFreeBSD-src-31a6358fffd6950960c98280182bba118f5ac9f9.zip
FreeBSD-src-31a6358fffd6950960c98280182bba118f5ac9f9.tar.gz
Add ipfw support for setting/matching DiffServ codepoints (DSCP).
Setting DSCP support is done via O_SETDSCP which works for both IPv4 and IPv6 packets. Fast checksum recalculation (RFC 1624) is done for IPv4. Dscp can be specified by name (AFXY, CSX, BE, EF), by value (0..63) or via tablearg. Matching DSCP is done via another opcode (O_DSCP) which accepts several classes at once (af11,af22,be). Classes are stored in bitmask (2 u32 words). Many people made their variants of this patch, the ones I'm aware of are (in alphabetic order): Dmitrii Tejblum Marcelo Araujo Roman Bogorodskiy (novel) Sergey Matveichuk (sem) Sergey Ryabin PR: kern/102471, kern/121122 MFC after: 2 weeks
Diffstat (limited to 'sys/netinet/ip_fw.h')
-rw-r--r--sys/netinet/ip_fw.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h
index 9693523..14b08f5 100644
--- a/sys/netinet/ip_fw.h
+++ b/sys/netinet/ip_fw.h
@@ -218,6 +218,9 @@ enum ipfw_opcodes { /* arguments (4 byte each) */
O_FORWARD_IP6, /* fwd sockaddr_in6 */
+ O_DSCP, /* 2 u32 = DSCP mask */
+ O_SETDSCP, /* arg1=DSCP value */
+
O_LAST_OPCODE /* not an opcode! */
};
OpenPOWER on IntegriCloud