2 // Copyright (c) 2017 Intel Corporation
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
17 #ifndef __INCLUDE_PIPELINE_CGNAPT_H__
18 #define __INCLUDE_PIPELINE_CGNAPT_H__
22 * Pipeline CG-NAPT FE.
24 * PipelineCG-NAPT Front End (FE).
25 * Runs on the Master pipeline, responsible for CLI commands.
30 #include "pipeline_cgnapt_common.h"
33 * Add NAPT rule to the NAPT rule table.
34 * Both IPv4 and IPv6 rules can be added.
37 * A pointer to the pipeline app parameters.
41 * A pointer to the NAPT key corresponding to the entry being added.
43 * A pointer to the NAPT entry being added.
46 * 0 on success, negative on error.
50 app_pipeline_cgnapt_add_entry(struct app_params *app,
52 struct pipeline_cgnapt_entry_key *key,
53 struct app_pipeline_cgnapt_entry_params
56 int app_pipeline_cgnapt_add_entry(
57 struct app_params *app,
59 struct app_pipeline_cgnapt_entry_params *entry_params);
61 * Delete NAPT rule from the NAPT rule table.
62 * Both IPv4 and IPv6 rules can be added.
65 * A pointer to the pipeline app parameters.
69 * A pointer to the NAPT key corresponding to the entry being added.
72 * 0 on success, negative on error.
75 app_pipeline_cgnapt_delete_entry(struct app_params *app,
77 struct pipeline_cgnapt_entry_key *key);
80 * Add multiple NAPT rule to the NAPT rule table.
81 * Both IPv4 and IPv6 rules can be added.
84 * A pointer to the pipeline app parameters.
88 * A pointer to the multiple NAPT entry params being added.
91 * 0 on success, negative on error.
93 int app_pipeline_cgnapt_addm_entry(struct app_params *app, uint32_t pipeline_id,
94 struct app_pipeline_cgnapt_mentry_params
98 * Add Network Specific Prefix for NAT64.
101 * A pointer to the pipeline app parameters.
105 * A pointer to NSP being added.
108 * 0 on success, negative on error.
111 app_pipeline_cgnapt_nsp_add_entry(struct app_params *app,
112 uint32_t pipeline_id,
113 struct pipeline_cgnapt_nsp_t *nsp);
116 * Delete a Network Specific Prefix for NAT64.
119 * A pointer to the pipeline app parameters.
123 * A pointer to NSP being deleted.
126 * 0 on success, negative on error.
129 app_pipeline_cgnapt_nsp_del_entry(struct app_params *app,
130 uint32_t pipeline_id,
131 struct pipeline_cgnapt_nsp_t *nsp);
136 extern struct pipeline_type pipeline_cgnapt;