2 * Copyright (c) 2017 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.
16 #include <vnet/vnet.h>
18 #ifndef SRC_VNET_SESSION_APPLICATION_NAMESPACE_H_
19 #define SRC_VNET_SESSION_APPLICATION_NAMESPACE_H_
21 typedef struct _app_namespace
24 * Local sw_if_index that supports transport connections for this namespace
29 * Network namespace (e.g., fib_index associated to the sw_if_index)
30 * wherein connections are to be established. Since v4 and v6 fibs are
31 * separate, we actually need to keep pointers to both.
37 * Local session table associated to ns
39 u32 local_table_index;
42 * Secret apps need to provide to authorize attachment to the namespace
47 * Application namespace id
52 typedef struct _vnet_app_namespace_add_del_args
60 } vnet_app_namespace_add_del_args_t;
62 #define APP_NAMESPACE_INVALID_INDEX ((u32)~0)
64 app_namespace_t *app_namespace_alloc (u8 * ns_id);
65 app_namespace_t *app_namespace_get (u32 index);
66 app_namespace_t *app_namespace_get_from_id (const u8 * ns_id);
67 u32 app_namespace_index (app_namespace_t * app_ns);
68 const u8 *app_namespace_id (app_namespace_t * app_ns);
69 const u8 *app_namespace_id_from_index (u32 index);
70 u32 app_namespace_index_from_id (const u8 * ns_id);
71 void app_namespaces_init (void);
72 clib_error_t *vnet_app_namespace_add_del (vnet_app_namespace_add_del_args_t *
75 #endif /* SRC_VNET_SESSION_APPLICATION_NAMESPACE_H_ */
78 * fd.io coding-style-patch-verification: ON
81 * eval: (c-set-style "gnu")