2d9a15bcf2c530f3121ec14126527f4356ac2203
[vpp.git] / vnet / vnet / ip / ip_feature_registration.h
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
16 #ifndef included_ip_feature_registration_h
17 #define included_ip_feature_registration_h
18
19 /** feature registration object */
20 typedef struct _vnet_ip_feature_registration
21 {
22   /** next registration in list of all registrations*/
23   struct _vnet_ip_feature_registration *next;
24   /** Graph node name */
25   char *node_name;
26   /** Pointer to this feature index, filled in by ip_feature_init_cast */
27   u32 *feature_index;
28   /** Constraints of the form "this feature runs before X" */
29   char **runs_before;
30   /** Constraints of the form "this feature runs after Y" */
31   char **runs_after;
32 } vnet_ip_feature_registration_t;
33
34 /** Syntactic sugar, the c-compiler won't initialize registrations without it */
35 #define ORDER_CONSTRAINTS (char*[])
36
37 clib_error_t *ip_feature_init_cast (vlib_main_t * vm,
38                                     ip_config_main_t * cm,
39                                     vnet_config_main_t * vcm,
40                                     char **feature_start_nodes,
41                                     int num_feature_start_nodes,
42                                     vnet_cast_t cast, int is_ip4);
43
44 #endif /* included_ip_feature_registration_h */
45
46 /*
47  * fd.io coding-style-patch-verification: ON
48  *
49  * Local Variables:
50  * eval: (c-set-style "gnu")
51  * End:
52  */