Neale Ranns | b71fa75 | 2019-04-04 12:43:36 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2019 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 __IPSEC_PUNT_H__ |
| 16 | #define __IPSEC_PUNT_H__ |
| 17 | |
| 18 | #include <vlib/vlib.h> |
| 19 | |
Mohammed Hawari | 45723b8 | 2021-02-05 15:40:00 +0100 | [diff] [blame] | 20 | #define foreach_ipsec_punt_reason \ |
| 21 | _ (IP4_SPI_UDP_0, "ipsec4-spi-o-udp-0", IP4_PACKET) \ |
| 22 | _ (IP4_NO_SUCH_TUNNEL, "ipsec4-no-such-tunnel", IP4_PACKET) \ |
Matthew Smith | 6f1eb48 | 2022-08-09 22:19:38 +0000 | [diff] [blame] | 23 | _ (IP6_NO_SUCH_TUNNEL, "ipsec6-no-such-tunnel", IP6_PACKET) \ |
| 24 | _ (IP6_SPI_UDP_0, "ipsec6-spi-o-udp-0", IP6_PACKET) |
Neale Ranns | b71fa75 | 2019-04-04 12:43:36 +0000 | [diff] [blame] | 25 | |
| 26 | typedef enum ipsec_punt_reason_t_ |
| 27 | { |
Mohammed Hawari | 45723b8 | 2021-02-05 15:40:00 +0100 | [diff] [blame] | 28 | #define _(s, v, f) IPSEC_PUNT_##s, |
Neale Ranns | b71fa75 | 2019-04-04 12:43:36 +0000 | [diff] [blame] | 29 | foreach_ipsec_punt_reason |
| 30 | #undef _ |
| 31 | IPSEC_PUNT_N_REASONS, |
| 32 | } ipsec_punt_reason_type_t; |
| 33 | |
| 34 | extern u8 *format_ipsec_punt_reason (u8 * s, va_list * args); |
| 35 | |
| 36 | extern vlib_punt_reason_t ipsec_punt_reason[IPSEC_PUNT_N_REASONS]; |
| 37 | |
| 38 | #endif /* __IPSEC_SPD_H__ */ |
| 39 | |
| 40 | /* |
| 41 | * fd.io coding-style-patch-verification: ON |
| 42 | * |
| 43 | * Local Variables: |
| 44 | * eval: (c-set-style "gnu") |
| 45 | * End: |
| 46 | */ |