summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_fw.h
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2010-03-15 17:14:27 +0000
committerluigi <luigi@FreeBSD.org>2010-03-15 17:14:27 +0000
commit3c242d0b3e2cdc0d6fa70de6a58e67d5ff2e85ab (patch)
tree7ab263a45df2704555a782f312cc897af6d31368 /sys/netinet/ip_fw.h
parent38cee4c83776b6f4640b4208f3664e106e2bfc5d (diff)
downloadFreeBSD-src-3c242d0b3e2cdc0d6fa70de6a58e67d5ff2e85ab.zip
FreeBSD-src-3c242d0b3e2cdc0d6fa70de6a58e67d5ff2e85ab.tar.gz
+ implement (two lines) the kernel side of 'lookup dscp N' to use the
dscp as a search key in table lookups; + (re)implement a sysctl variable to control the expire frequency of pipes and queues when they become empty; + add 'queue number' as optional part of the flow_id. This can be enabled with the command queue X config mask queue ... and makes it possible to support priority-based schedulers, where packets should be grouped according to the priority and not some fields in the 5-tuple. This is implemented as follows: - redefine a field in the ipfw_flow_id (in sys/netinet/ip_fw.h) but without changing the size or shape of the structure, so there are no ABI changes. On passing, also document how other fields are used, and remove some useless assignments in ip_fw2.c - implement small changes in the userland code to set/read the field; - revise the functions in ip_dummynet.c to manipulate masks so they also handle the additional field; There are no ABI changes in this commit.
Diffstat (limited to 'sys/netinet/ip_fw.h')
-rw-r--r--sys/netinet/ip_fw.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h
index d357f18..cf5d8d0 100644
--- a/sys/netinet/ip_fw.h
+++ b/sys/netinet/ip_fw.h
@@ -487,24 +487,27 @@ struct ip_fw {
#define RULESIZE(rule) (sizeof(struct ip_fw) + \
((struct ip_fw *)(rule))->cmd_len * 4 - 4)
-#if 1 // moved to in.h
+#if 1 // should be moved to in.h
/*
* This structure is used as a flow mask and a flow id for various
* parts of the code.
+ * addr_type is used in userland and kernel to mark the address type.
+ * fib is used in the kernel to record the fib in use.
+ * _flags is used in the kernel to store tcp flags for dynamic rules.
*/
struct ipfw_flow_id {
uint32_t dst_ip;
uint32_t src_ip;
uint16_t dst_port;
uint16_t src_port;
- uint8_t fib;
- uint8_t proto;
- uint8_t flags; /* protocol-specific flags */
- uint8_t addr_type; /* 4 = ipv4, 6 = ipv6, 1=ether ? */
+ uint8_t fib;
+ uint8_t proto;
+ uint8_t _flags; /* protocol-specific flags */
+ uint8_t addr_type; /* 4=ip4, 6=ip6, 1=ether ? */
struct in6_addr dst_ip6;
struct in6_addr src_ip6;
uint32_t flow_id6;
- uint32_t frag_id6;
+ uint32_t extra; /* queue/pipe or frag_id */
};
#endif
OpenPOWER on IntegriCloud