Ole Troan | 92eade1 | 2016-01-13 20:17:08 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015 Cisco and/or its affiliates. |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | * you may not use this file except in compliance with the License. |
| 5 | * You may obtain a copy of the License at: |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software |
| 10 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | * See the License for the specific language governing permissions and |
| 13 | * limitations under the License. |
| 14 | */ |
| 15 | #ifndef included_vnet_icmp4_h |
| 16 | #define included_vnet_icmp4_h |
| 17 | |
Dave Barach | d7cb1b5 | 2016-12-09 09:52:16 -0500 | [diff] [blame] | 18 | typedef struct |
| 19 | { |
Ole Troan | 92eade1 | 2016-01-13 20:17:08 +0100 | [diff] [blame] | 20 | u8 packet_data[64]; |
| 21 | } icmp_input_trace_t; |
| 22 | |
| 23 | format_function_t format_icmp4_input_trace; |
Dave Barach | d7cb1b5 | 2016-12-09 09:52:16 -0500 | [diff] [blame] | 24 | void ip4_icmp_register_type (vlib_main_t * vm, icmp4_type_t type, |
| 25 | u32 node_index); |
Mohsin Kazmi | 26c7a4b | 2019-10-09 18:35:16 +0200 | [diff] [blame] | 26 | |
| 27 | static_always_inline void |
| 28 | icmp4_error_set_vnet_buffer (vlib_buffer_t * b, u8 type, u8 code, u32 data) |
| 29 | { |
| 30 | vnet_buffer (b)->ip.icmp.type = type; |
| 31 | vnet_buffer (b)->ip.icmp.code = code; |
| 32 | vnet_buffer (b)->ip.icmp.data = data; |
| 33 | } |
Ole Troan | 92eade1 | 2016-01-13 20:17:08 +0100 | [diff] [blame] | 34 | |
Neale Ranns | f6c8f50 | 2019-10-25 01:40:47 -0700 | [diff] [blame] | 35 | extern vlib_node_registration_t ip4_icmp_input_node; |
| 36 | |
Ole Troan | 92eade1 | 2016-01-13 20:17:08 +0100 | [diff] [blame] | 37 | #endif /* included_vnet_icmp4_h */ |
Dave Barach | d7cb1b5 | 2016-12-09 09:52:16 -0500 | [diff] [blame] | 38 | |
| 39 | /* |
| 40 | * fd.io coding-style-patch-verification: ON |
| 41 | * |
| 42 | * Local Variables: |
| 43 | * eval: (c-set-style "gnu") |
| 44 | * End: |
| 45 | */ |