diff options
author | Justin Pettit <jpettit@nicira.com> | 2011-11-05 15:48:12 -0700 |
---|---|---|
committer | Justin Pettit <jpettit@nicira.com> | 2011-11-09 13:24:52 -0800 |
commit | a61680c6d15fa1f1ae3072a83c0e3d7ed08f6048 (patch) | |
tree | 49c8cdf78a7cd9da50fd27f2dd304335215a5f68 /include | |
parent | 530180fd5a99e2c55107831f99fee84d6780f38c (diff) |
Support matching and modifying IP TTL.
Add support matching the IPv4 TTL and IPv6 hop limit fields. This
commit also adds support for modifying the IPv4 TTL. Modifying the IPv6
hop limit isn't currently supported, since we don't support modifying
IPv6 headers.
We will likely want to change the user-space interface, since basic
matching and setting the TTL are not generally useful. We will probably
want the ability to match on extraordinary events (such as TTL of 0 or 1)
and a decrement action.
Feature #8024
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/openvswitch.h | 2 | ||||
-rw-r--r-- | include/openflow/nicira-ext.h | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch.h index 62668a62..c94c5347 100644 --- a/include/linux/openvswitch.h +++ b/include/linux/openvswitch.h @@ -316,6 +316,7 @@ struct ovs_key_ipv4 { __be32 ipv4_dst; __u8 ipv4_proto; __u8 ipv4_tos; + __u8 ipv4_ttl; __u8 ipv4_frag; /* One of OVS_FRAG_TYPE_*. */ }; @@ -325,6 +326,7 @@ struct ovs_key_ipv6 { __be32 ipv6_label; /* 20-bits in least-significant bits. */ __u8 ipv6_proto; __u8 ipv6_tos; + __u8 ipv6_hlimit; __u8 ipv6_frag; /* One of OVS_FRAG_TYPE_*. */ }; diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h index b55ea9d0..06b9035a 100644 --- a/include/openflow/nicira-ext.h +++ b/include/openflow/nicira-ext.h @@ -1632,6 +1632,15 @@ OFP_ASSERT(sizeof(struct nx_action_output_reg) == 24); * Masking: Not maskable. */ #define NXM_NX_IP_ECN NXM_HEADER (0x0001, 28, 1) +/* The time-to-live/hop limit of the IP header. + * + * Prereqs: NXM_OF_ETH_TYPE must be either 0x0800 or 0x86dd. + * + * Format: 8-bit integer. + * + * Masking: Not maskable. */ +#define NXM_NX_IP_TTL NXM_HEADER (0x0001, 29, 1) + /* ## --------------------- ## */ /* ## Requests and replies. ## */ /* ## --------------------- ## */ |