diff options
| author | Simon Horman <simon.horman@netronome.com> | 2016-12-07 07:48:27 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-12-08 11:45:21 -0500 |
| commit | 972d3876faa8a9195122b2d2bcd3155f904fff37 (patch) | |
| tree | 1f8babbc7497c6d5da9be741371472306d804b9b /include/net | |
| parent | 7cc99fd29b982964e63afa92a7e29db49b69c90e (diff) | |
flow dissector: ICMP support
Allow dissection of ICMP(V6) type and code. This should only occur
if a packet is ICMP(V6) and the dissector has FLOW_DISSECTOR_KEY_ICMP set.
There are currently no users of FLOW_DISSECTOR_KEY_ICMP.
A follow-up patch will allow FLOW_DISSECTOR_KEY_ICMP to be used by
the flower classifier.
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/flow_dissector.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h index c4f31666afd2..d896a33e00d4 100644 --- a/include/net/flow_dissector.h +++ b/include/net/flow_dissector.h | |||
| @@ -104,6 +104,22 @@ struct flow_dissector_key_ports { | |||
| 104 | }; | 104 | }; |
| 105 | }; | 105 | }; |
| 106 | 106 | ||
| 107 | /** | ||
| 108 | * flow_dissector_key_icmp: | ||
| 109 | * @ports: type and code of ICMP header | ||
| 110 | * icmp: ICMP type (high) and code (low) | ||
| 111 | * type: ICMP type | ||
| 112 | * code: ICMP code | ||
| 113 | */ | ||
| 114 | struct flow_dissector_key_icmp { | ||
| 115 | union { | ||
| 116 | __be16 icmp; | ||
| 117 | struct { | ||
| 118 | u8 type; | ||
| 119 | u8 code; | ||
| 120 | }; | ||
| 121 | }; | ||
| 122 | }; | ||
| 107 | 123 | ||
| 108 | /** | 124 | /** |
| 109 | * struct flow_dissector_key_eth_addrs: | 125 | * struct flow_dissector_key_eth_addrs: |
| @@ -122,6 +138,7 @@ enum flow_dissector_key_id { | |||
| 122 | FLOW_DISSECTOR_KEY_IPV4_ADDRS, /* struct flow_dissector_key_ipv4_addrs */ | 138 | FLOW_DISSECTOR_KEY_IPV4_ADDRS, /* struct flow_dissector_key_ipv4_addrs */ |
| 123 | FLOW_DISSECTOR_KEY_IPV6_ADDRS, /* struct flow_dissector_key_ipv6_addrs */ | 139 | FLOW_DISSECTOR_KEY_IPV6_ADDRS, /* struct flow_dissector_key_ipv6_addrs */ |
| 124 | FLOW_DISSECTOR_KEY_PORTS, /* struct flow_dissector_key_ports */ | 140 | FLOW_DISSECTOR_KEY_PORTS, /* struct flow_dissector_key_ports */ |
| 141 | FLOW_DISSECTOR_KEY_ICMP, /* struct flow_dissector_key_icmp */ | ||
| 125 | FLOW_DISSECTOR_KEY_ETH_ADDRS, /* struct flow_dissector_key_eth_addrs */ | 142 | FLOW_DISSECTOR_KEY_ETH_ADDRS, /* struct flow_dissector_key_eth_addrs */ |
| 126 | FLOW_DISSECTOR_KEY_TIPC_ADDRS, /* struct flow_dissector_key_tipc_addrs */ | 143 | FLOW_DISSECTOR_KEY_TIPC_ADDRS, /* struct flow_dissector_key_tipc_addrs */ |
| 127 | FLOW_DISSECTOR_KEY_VLAN, /* struct flow_dissector_key_flow_vlan */ | 144 | FLOW_DISSECTOR_KEY_VLAN, /* struct flow_dissector_key_flow_vlan */ |
