FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
application_namespace.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-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 
19 #include <vnet/session/session.h>
20 #include <vnet/fib/fib_table.h>
21 #include <vppinfra/file.h>
22 #include <vppinfra/format_table.h>
23 #include <vlib/unix/unix.h>
24 
25 /**
26  * Hash table of application namespaces by app ns ids
27  */
29 
30 /**
31  * Pool of application namespaces
32  */
34 
36 
39 {
41 }
42 
45 {
48  return 0;
49  return app_namespace_get (index);
50 }
51 
52 u32
54 {
55  return (app_ns - app_namespace_pool);
56 }
57 
58 void
60 {
62  vec_free (app_ns->ns_id);
63 
64  pool_put (app_namespace_pool, app_ns);
65 }
66 
68 app_namespace_alloc (const u8 *ns_id)
69 {
70  app_namespace_t *app_ns;
71 
72  pool_get (app_namespace_pool, app_ns);
73  clib_memset (app_ns, 0, sizeof (*app_ns));
74 
75  app_ns->ns_id = vec_dup ((u8 *) ns_id);
76  vec_terminate_c_string (app_ns->ns_id);
77 
79  app_ns - app_namespace_pool);
80 
81  return app_ns;
82 }
83 
84 int
86 {
87  app_namespace_t *app_ns;
88  session_table_t *st;
89  u32 ns_index;
90  int rv;
91 
92  if (a->is_add)
93  {
94  if (a->sw_if_index != APP_NAMESPACE_INVALID_INDEX
96  a->sw_if_index))
97  return VNET_API_ERROR_INVALID_SW_IF_INDEX;
98 
99 
100  if (a->sw_if_index != APP_NAMESPACE_INVALID_INDEX)
101  {
102  a->ip4_fib_id =
104  a->sw_if_index);
105  a->ip6_fib_id =
107  a->sw_if_index);
108  }
109  if (a->sw_if_index == APP_NAMESPACE_INVALID_INDEX
110  && a->ip4_fib_id == APP_NAMESPACE_INVALID_INDEX)
111  return VNET_API_ERROR_INVALID_VALUE;
112 
113  app_ns = app_namespace_get_from_id (a->ns_id);
114  if (!app_ns)
115  {
116  app_ns = app_namespace_alloc (a->ns_id);
117  st = session_table_alloc ();
119  st->is_local = 1;
120  st->appns_index = app_namespace_index (app_ns);
121  app_ns->local_table_index = session_table_index (st);
122  if (a->netns)
123  {
124  app_ns->netns = vec_dup (a->netns);
125  vec_terminate_c_string (app_ns->netns);
126  }
127  if (a->sock_name)
128  {
129  app_ns->sock_name = vec_dup (a->sock_name);
130  vec_terminate_c_string (app_ns->sock_name);
131  }
132 
133  /* Add socket for namespace,
134  * only at creation time */
135  if (app_sapi_enabled)
136  {
137  rv = appns_sapi_add_ns_socket (app_ns);
138  if (rv)
139  return rv;
140  }
141  }
142 
143  app_ns->ns_secret = a->secret;
144  app_ns->sw_if_index = a->sw_if_index;
145  app_ns->ip4_fib_index =
146  fib_table_find (FIB_PROTOCOL_IP4, a->ip4_fib_id);
147  app_ns->ip6_fib_index =
148  fib_table_find (FIB_PROTOCOL_IP6, a->ip6_fib_id);
150 
151  }
152  else
153  {
154  ns_index = app_namespace_index_from_id (a->ns_id);
155  if (ns_index == APP_NAMESPACE_INVALID_INDEX)
156  return VNET_API_ERROR_INVALID_VALUE;
157 
158  app_ns = app_namespace_get (ns_index);
159  if (!app_ns)
160  return VNET_API_ERROR_INVALID_VALUE;
161 
163 
164  if (app_sapi_enabled)
165  appns_sapi_del_ns_socket (app_ns);
166 
167  st = session_table_get (app_ns->local_table_index);
168 
170  if (app_ns->netns)
171  vec_free (app_ns->netns);
172  if (app_ns->sock_name)
173  vec_free (app_ns->sock_name);
174 
175  app_namespace_free (app_ns);
176  }
177 
178  return 0;
179 }
180 
181 const u8 *
183 {
184  return app_ns->ns_id;
185 }
186 
187 u32
189 {
190  uword *indexp;
191  u8 *key;
192 
193  key = vec_dup ((u8 *) ns_id);
195 
197  vec_free (key);
198  if (!indexp)
200  return *indexp;
201 }
202 
203 const u8 *
205 {
206  app_namespace_t *app_ns;
207 
208  app_ns = app_namespace_get (index);
209  return app_namespace_id (app_ns);
210 }
211 
212 u32
214 {
215  return fib_proto == FIB_PROTOCOL_IP4 ?
216  app_ns->ip4_fib_index : app_ns->ip6_fib_index;
217 }
218 
221 {
222  return session_table_get (app_ns->local_table_index);
223 }
224 
225 void
227 {
228  app_sapi_enabled = 1;
229 }
230 
231 u8
233 {
234  return app_sapi_enabled;
235 }
236 
237 void
239 {
240  u8 *ns_id = format (0, "default");
241 
244  hash_create_vec (0, sizeof (u8), sizeof (uword));
245 
246  /*
247  * Allocate default namespace
248  */
249 
250  /* clang-format off */
252  .ns_id = ns_id,
253  .netns = 0,
254  .sock_name = 0,
255  .secret = 0,
256  .sw_if_index = APP_NAMESPACE_INVALID_INDEX,
257  .is_add = 1
258  };
259  /* clang-format on */
260 
262  vec_free (ns_id);
263 }
264 
265 static clib_error_t *
267  vlib_cli_command_t * cmd)
268 {
269  u8 is_add = 0, *ns_id = 0, secret_set = 0, sw_if_index_set = 0;
270  u8 *netns = 0, *sock_name = 0;
271  unformat_input_t _line_input, *line_input = &_line_input;
273  vnet_main_t *vnm = vnet_get_main ();
274  u64 secret;
275  clib_error_t *error = 0;
276  int rv;
277 
279 
280  if (!unformat_user (input, unformat_line_input, line_input))
281  return 0;
282 
283  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
284  {
285  if (unformat (line_input, "add"))
286  is_add = 1;
287  else if (unformat (line_input, "del"))
288  is_add = 0;
289  else if (unformat (line_input, "id %_%v%_", &ns_id))
290  ;
291  else if (unformat (line_input, "secret %lu", &secret))
292  secret_set = 1;
293  else if (unformat (line_input, "sw_if_index %u", &sw_if_index))
294  sw_if_index_set = 1;
295  else if (unformat (line_input, "if %U", unformat_vnet_sw_interface, vnm,
296  &sw_if_index))
297  sw_if_index_set = 1;
298  else if (unformat (line_input, "fib_id", &fib_id))
299  ;
300  else if (unformat (line_input, "netns %_%v%_", &netns))
301  ;
302  else if (unformat (line_input, "sock-name %_%v%_", &sock_name))
303  ;
304  else
305  {
306  error = clib_error_return (0, "unknown input `%U'",
307  format_unformat_error, line_input);
308  goto done;
309  }
310  }
311 
312  if (!ns_id)
313  {
314  vlib_cli_output (vm, "namespace-id must be provided");
315  goto done;
316  }
317 
318  if (is_add && (!secret_set || !sw_if_index_set))
319  {
320  vlib_cli_output (vm, "secret and interface must be provided");
321  goto done;
322  }
323 
324  /* clang-format off */
326  .ns_id = ns_id,
327  .netns = netns,
328  .secret = secret,
329  .sw_if_index = sw_if_index,
330  .sock_name = sock_name,
331  .ip4_fib_id = fib_id,
332  .is_add = is_add,
333  };
334  /* clang-format on */
335 
336  if ((rv = vnet_app_namespace_add_del (&args)))
337  error = clib_error_return (0, "app namespace add del returned %d", rv);
338 
339 done:
340 
341  vec_free (ns_id);
342  vec_free (netns);
343  vec_free (sock_name);
344  unformat_free (line_input);
345 
346  return error;
347 }
348 
349 /* *INDENT-OFF* */
351  .path = "app ns",
352  .short_help = "app ns [add|del] id <namespace-id> secret <secret> "
353  "sw_if_index <sw_if_index> if <interface> [netns <ns>]",
354  .function = app_ns_fn,
355 };
356 /* *INDENT-ON* */
357 
358 u8 *
359 format_app_namespace (u8 * s, va_list * args)
360 {
361  app_namespace_t *app_ns = va_arg (*args, app_namespace_t *);
362  vnet_main_t *vnm = vnet_get_main ();
363 
364  s = format (s, "Application namespace [%u]\nid: %s\nsecret: %lu",
365  app_namespace_index (app_ns), app_ns->ns_id, app_ns->ns_secret);
366  if (app_ns->sw_if_index != (u32) ~0)
367  s = format (s, "\nInterface: %U", format_vnet_sw_if_index_name, vnm,
368  app_ns->sw_if_index);
369  if (app_ns->netns)
370  s = format (s, "\nNetns: %s", app_ns->netns);
371  if (app_ns->sock_name)
372  s = format (s, "\nSocket: %s", app_ns->sock_name);
373 
374  return s;
375 }
376 
377 static void
379 {
380  app_ns_api_handle_t *handle;
381  app_worker_t *app_wrk;
382  clib_socket_t *cs;
383  clib_file_t *cf;
384 
385  if (!app_sapi_enabled)
386  {
387  vlib_cli_output (vm, "app socket api not enabled!");
388  return;
389  }
390 
391  vlib_cli_output (vm, "socket: %v\n", app_ns->sock_name);
392 
393  if (!pool_elts (app_ns->app_sockets))
394  return;
395 
396  vlib_cli_output (vm, "%12s%12s%5s", "app index", "wrk index", "fd");
397 
398 
399  /* *INDENT-OFF* */
400  pool_foreach (cs, app_ns->app_sockets) {
401  handle = (app_ns_api_handle_t *) &cs->private_data;
402  cf = clib_file_get (&file_main, handle->aah_file_index);
403  if (handle->aah_app_wrk_index == APP_INVALID_INDEX)
404  {
405  vlib_cli_output (vm, "%12d%12d%5u", -1, -1, cf->file_descriptor);
406  continue;
407  }
408  app_wrk = app_worker_get (handle->aah_app_wrk_index);
409  vlib_cli_output (vm, "%12d%12d%5u", app_wrk->app_index,
410  app_wrk->wrk_map_index, cf->file_descriptor);
411  }
412  /* *INDENT-ON* */
413 }
414 
415 static clib_error_t *
417  vlib_cli_command_t * cmd)
418 {
419  unformat_input_t _line_input, *line_input = &_line_input;
420  u8 *ns_id = 0, do_table = 0, had_input = 1, do_api = 0;
421  app_namespace_t *app_ns;
422  vnet_main_t *vnm = vnet_get_main ();
423  session_table_t *st;
424  table_t table = {}, *t = &table;
425 
427 
428  if (!unformat_user (main_input, unformat_line_input, line_input))
429  {
430  had_input = 0;
431  goto do_ns_list;
432  }
433 
434  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
435  {
436  if (unformat (line_input, "id %_%v%_", &ns_id))
437  do_table = 1;
438  else if (unformat (line_input, "api-clients"))
439  do_api = 1;
440  else
441  {
442  vlib_cli_output (vm, "unknown input [%U]", format_unformat_error,
443  line_input);
444  goto done;
445  }
446  }
447 
448  if (do_api)
449  {
450  if (!do_table)
451  {
452  vlib_cli_output (vm, "must specify a table for api");
453  goto done;
454  }
455  app_ns = app_namespace_get_from_id (ns_id);
456  app_namespace_show_api (vm, app_ns);
457  goto done;
458  }
459  if (do_table)
460  {
461  app_ns = app_namespace_get_from_id (ns_id);
462  if (!app_ns)
463  {
464  vlib_cli_output (vm, "ns %v not found", ns_id);
465  goto done;
466  }
467  st = session_table_get (app_ns->local_table_index);
468  if (!st)
469  {
470  vlib_cli_output (vm, "table for ns %v could not be found", ns_id);
471  goto done;
472  }
473  vlib_cli_output (vm, "%U", format_app_namespace, app_ns);
475  vec_free (ns_id);
476  goto done;
477  }
478 
479 do_ns_list:
480  table_add_header_col (t, 6, "Index", "Secret", "Interface", "Id", "Netns",
481  "Socket");
482  int i = 0;
484  {
485  int j = 0;
486  table_format_cell (t, i, j++, "%u", app_namespace_index (app_ns));
487  table_format_cell (t, i, j++, "%lu", app_ns->ns_secret);
488  table_format_cell (t, i, j++, "%U", format_vnet_sw_if_index_name, vnm,
489  app_ns->sw_if_index);
490  table_format_cell (t, i, j++, "%s", app_ns->ns_id);
491  table_format_cell (t, i, j++, "%s", app_ns->netns);
492  table_format_cell (t, i++, j++, "%s", app_ns->sock_name);
493  }
494 
495  t->default_body.align = TTAA_LEFT;
496  t->default_header_col.align = TTAA_LEFT;
497  t->default_header_col.fg_color = TTAC_YELLOW;
498  t->default_header_col.flags = TTAF_FG_COLOR_SET;
499  vlib_cli_output (vm, "%U", format_table, t);
500  table_free (t);
501 
502 done:
503  if (had_input)
504  unformat_free (line_input);
505  return 0;
506 }
507 
508 /* *INDENT-OFF* */
510  .path = "show app ns",
511  .short_help = "show app ns [id <id> [api-clients]]",
512  .function = show_app_ns_fn,
513 };
514 /* *INDENT-ON* */
515 
516 /*
517  * fd.io coding-style-patch-verification: ON
518  *
519  * Local Variables:
520  * eval: (c-set-style "gnu")
521  * End:
522  */
clib_file::file_descriptor
u32 file_descriptor
Definition: file.h:54
FIB_PROTOCOL_MAX
#define FIB_PROTOCOL_MAX
Definition outside of enum so it does not need to be included in non-defaulted switch statements.
Definition: fib_types.h:51
file_main
clib_file_main_t file_main
Definition: main.c:63
unformat_user
uword unformat_user(unformat_input_t *input, unformat_function_t *func,...)
Definition: unformat.c:989
app_namespace_free
void app_namespace_free(app_namespace_t *app_ns)
Definition: application_namespace.c:59
app_namespace_id_from_index
const u8 * app_namespace_id_from_index(u32 index)
Definition: application_namespace.c:204
vnet_app_namespace_add_del_args_t
struct _vnet_app_namespace_add_del_args vnet_app_namespace_add_del_args_t
table_free
void table_free(table_t *t)
Definition: format_table.c:232
APP_NAMESPACE_INVALID_INDEX
#define APP_NAMESPACE_INVALID_INDEX
Definition: application_namespace.h:81
format_app_namespace
u8 * format_app_namespace(u8 *s, va_list *args)
Definition: application_namespace.c:359
unformat_line_input
unformat_function_t unformat_line_input
Definition: format.h:275
pool_elt_at_index
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:549
vnet_get_sw_interface_or_null
static vnet_sw_interface_t * vnet_get_sw_interface_or_null(vnet_main_t *vnm, u32 sw_if_index)
Definition: interface_funcs.h:64
session_table_free
void session_table_free(session_table_t *slt, u8 fib_proto)
Definition: session_table.c:64
app_namespace_t
struct _app_namespace app_namespace_t
application_namespace.h
clib_error_return
#define clib_error_return(e, args...)
Definition: error.h:99
vlib_cli_command_t::path
char * path
Definition: cli.h:96
app_ns_fn
static clib_error_t * app_ns_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: application_namespace.c:266
appns_sapi_add_ns_socket
int appns_sapi_add_ns_socket(app_namespace_t *app_ns)
Definition: session_api.c:1783
fib_table.h
format_table.h
hash_set_mem
#define hash_set_mem(h, key, value)
Definition: hash.h:275
APP_INVALID_INDEX
#define APP_INVALID_INDEX
Definition: application.h:226
pool_put
#define pool_put(P, E)
Free an object E in pool P.
Definition: pool.h:305
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
app_namespaces_init
void app_namespaces_init(void)
Definition: application_namespace.c:238
app_ns_api_handle_
Definition: application_namespace.h:101
unformat_input_t
struct _unformat_input_t unformat_input_t
app_namespace_get
app_namespace_t * app_namespace_get(u32 index)
Definition: application_namespace.c:38
application_namespace_cleanup
void application_namespace_cleanup(app_namespace_t *app_ns)
Definition: application.c:951
session_lookup_show_table_entries
void session_lookup_show_table_entries(vlib_main_t *vm, session_table_t *table, u8 type, u8 is_local)
Definition: session_lookup.c:1427
error
Definition: cJSON.c:88
key
typedef key
Definition: ipsec_types.api:91
unformat
uword unformat(unformat_input_t *i, const char *fmt,...)
Definition: unformat.c:978
session_table_init
void session_table_init(session_table_t *slt, u8 fib_proto)
Initialize session table hash tables.
Definition: session_table.c:95
TTAC_YELLOW
@ TTAC_YELLOW
Definition: format_table.h:44
app_namespace_lookup_table
uword * app_namespace_lookup_table
Hash table of application namespaces by app ns ids.
Definition: application_namespace.c:28
TTAF_FG_COLOR_SET
@ TTAF_FG_COLOR_SET
Definition: format_table.h:33
pool_foreach
#define pool_foreach(VAR, POOL)
Iterate through pool.
Definition: pool.h:534
app_namespace_get_fib_index
u32 app_namespace_get_fib_index(app_namespace_t *app_ns, u8 fib_proto)
Definition: application_namespace.c:213
fib_table_get_table_id_for_sw_if_index
u32 fib_table_get_table_id_for_sw_if_index(fib_protocol_t proto, u32 sw_if_index)
Get the Table-ID of the FIB bound to the interface.
Definition: fib_table.c:1087
app_ns_command
static vlib_cli_command_t app_ns_command
(constructor) VLIB_CLI_COMMAND (app_ns_command)
Definition: application_namespace.c:350
unformat_free
static void unformat_free(unformat_input_t *i)
Definition: format.h:155
hash_unset_mem
#define hash_unset_mem(h, key)
Definition: hash.h:291
vec_dup
#define vec_dup(V)
Return copy of vector (no header, no alignment)
Definition: vec.h:444
vnet_get_main
vnet_main_t * vnet_get_main(void)
Definition: pnat_test_stubs.h:56
clib_file
Definition: file.h:51
app_namespace_pool
static app_namespace_t * app_namespace_pool
Pool of application namespaces.
Definition: application_namespace.c:33
unformat_check_input
static uword unformat_check_input(unformat_input_t *i)
Definition: format.h:163
session_table_index
u32 session_table_index(session_table_t *slt)
Definition: session_table.c:40
appns_sapi_del_ns_socket
void appns_sapi_del_ns_socket(app_namespace_t *app_ns)
Definition: session_api.c:1766
uword
u64 uword
Definition: types.h:112
format_table
__clib_export format_function_t format_table
Definition: format_table.h:95
format_unformat_error
u8 * format_unformat_error(u8 *s, va_list *va)
Definition: unformat.c:91
pool_get
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
Definition: pool.h:255
TTAA_LEFT
@ TTAA_LEFT
Definition: format_table.h:54
VLIB_CLI_COMMAND
#define VLIB_CLI_COMMAND(x,...)
Definition: cli.h:163
show_app_ns_fn
static clib_error_t * show_app_ns_fn(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
Definition: application_namespace.c:416
FIB_PROTOCOL_IP4
@ FIB_PROTOCOL_IP4
Definition: fib_types.h:36
app_namespace_alloc
app_namespace_t * app_namespace_alloc(const u8 *ns_id)
Definition: application_namespace.c:68
vlib_cli_output
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
Definition: cli.c:716
clib_file_get
static clib_file_t * clib_file_get(clib_file_main_t *fm, u32 file_index)
Definition: file.h:152
table_format_cell
void table_format_cell(table_t *t, int c, int r, char *fmt,...)
Definition: format_table.c:192
hash_create_vec
#define hash_create_vec(elts, key_bytes, value_bytes)
Definition: hash.h:667
hash_get_mem
#define hash_get_mem(h, key)
Definition: hash.h:269
vnet_main_t
Definition: vnet.h:76
vec_free
#define vec_free(V)
Free vector's memory (no header).
Definition: vec.h:395
index
u32 index
Definition: flow_types.api:221
app_namespace_show_api
static void app_namespace_show_api(vlib_main_t *vm, app_namespace_t *app_ns)
Definition: application_namespace.c:378
table_t
Definition: format_table.h:80
u64
unsigned long u64
Definition: types.h:89
format_vnet_sw_if_index_name
format_function_t format_vnet_sw_if_index_name
Definition: interface_funcs.h:458
unformat_vnet_sw_interface
unformat_function_t unformat_vnet_sw_interface
Definition: interface_funcs.h:462
format
description fragment has unexpected format
Definition: map.api:433
app_namespace_index_from_id
u32 app_namespace_index_from_id(const u8 *ns_id)
Definition: application_namespace.c:188
u32
unsigned int u32
Definition: types.h:88
FIB_PROTOCOL_IP6
@ FIB_PROTOCOL_IP6
Definition: fib_types.h:37
app_worker_get
app_worker_t * app_worker_get(u32 wrk_index)
Definition: application_worker.c:41
app_worker_
Definition: application.h:32
show_app_ns_command
static vlib_cli_command_t show_app_ns_command
(constructor) VLIB_CLI_COMMAND (show_app_ns_command)
Definition: application_namespace.c:509
pool_elts
static uword pool_elts(void *v)
Number of active elements in a pool.
Definition: pool.h:127
app_namespace_index
u32 app_namespace_index(app_namespace_t *app_ns)
Definition: application_namespace.c:53
appns_sapi_enable
void appns_sapi_enable(void)
Definition: application_namespace.c:226
clib_memset
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
vlib_main_t
Definition: main.h:102
app_worker_::wrk_map_index
u32 wrk_map_index
Worker index in app's map pool.
Definition: application.h:40
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
a
a
Definition: bitmap.h:525
unix.h
vec_terminate_c_string
#define vec_terminate_c_string(V)
(If necessary) NULL terminate a vector containing a c-string.
Definition: vec.h:1132
session.h
i
int i
Definition: flowhash_template.h:376
file.h
rv
int __clib_unused rv
Definition: application.c:491
session_table.h
session_table_alloc
session_table_t * session_table_alloc(void)
Definition: session_table.c:31
app_worker_::app_index
u32 app_index
Index of owning app.
Definition: application.h:43
clib_socket_t
struct _socket_t clib_socket_t
session_lookup_set_tables_appns
void session_lookup_set_tables_appns(app_namespace_t *app_ns)
Mark (global) tables as pertaining to app ns.
Definition: session_lookup.c:1361
vnet_app_namespace_add_del
int vnet_app_namespace_add_del(vnet_app_namespace_add_del_args_t *a)
Definition: application_namespace.c:85
session_cli_return_if_not_enabled
#define session_cli_return_if_not_enabled()
Definition: session.h:728
vlib_cli_command_t
Definition: cli.h:92
fib_table_find
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
Definition: fib_table.c:1111
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
app_namespace_get_local_table
session_table_t * app_namespace_get_local_table(app_namespace_t *app_ns)
Definition: application_namespace.c:220
table_add_header_col
void table_add_header_col(table_t *t, int n_strings,...)
Definition: format_table.c:247
appns_sapi_enabled
u8 appns_sapi_enabled(void)
Definition: application_namespace.c:232
session_table_t
struct _session_lookup_table session_table_t
app_namespace_get_from_id
app_namespace_t * app_namespace_get_from_id(const u8 *ns_id)
Definition: application_namespace.c:44
UNFORMAT_END_OF_INPUT
#define UNFORMAT_END_OF_INPUT
Definition: format.h:137
session_table_get
session_table_t * session_table_get(u32 table_index)
Definition: session_table.c:46
app_sapi_enabled
static u8 app_sapi_enabled
Definition: application_namespace.c:35
application.h
app_namespace_id
const u8 * app_namespace_id(app_namespace_t *app_ns)
Definition: application_namespace.c:182