2 * Copyright (c) 2020 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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @brief NAT port/address allocation lib
19 #ifndef included_nat_lib_h__
20 #define included_nat_lib_h__
22 #define foreach_nat_error \
23 _ (VALUE_EXIST, -1, "Value already exists") \
24 _ (NO_SUCH_ENTRY, -2, "No such entry") \
25 _ (UNKNOWN_PROTOCOL, -3, "Unknown protocol") \
26 _ (OUT_OF_TRANSLATIONS, -4, "Out of translations")
30 #define _(N, i, s) NAT_ERROR_##N = i,
35 #define foreach_nat_protocol \
36 _ (OTHER, 0, other, "other") \
37 _ (UDP, 1, udp, "udp") \
38 _ (TCP, 2, tcp, "tcp") \
39 _ (ICMP, 3, icmp, "icmp")
43 #define _(N, i, n, s) NAT_PROTOCOL_##N = i,
48 #endif /* included_nat_lib_h__ */
50 * fd.io coding-style-patch-verification: ON
53 * eval: (c-set-style "gnu")