FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
custom_dump.c
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------
3  * custom_dump.c - pretty-print API messages for replay
4  *
5  * Copyright (c) 2014-2016 Cisco and/or its affiliates. Licensed under the
6  * Apache License, Version 2.0 (the "License"); you may not use this file
7  * except in compliance with the License. You may obtain a copy of the
8  * License at:
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15  * License for the specific language governing permissions and limitations
16  * under the License.
17  * ------------------------------------------------------------------
18  */
19 
20 #include <vnet/vnet.h>
21 #include <vnet/ip/ip.h>
23 #include <vnet/ip/ip_types_api.h>
24 #include <vnet/fib/fib_api.h>
25 #include <vnet/unix/tuntap.h>
26 #include <vnet/mpls/mpls.h>
27 #include <vnet/l2tp/l2tp.h>
28 #include <vnet/l2/l2_input.h>
29 #include <vnet/srv6/sr.h>
30 #include <vnet/srmpls/sr_mpls.h>
31 #include <vnet/gre/gre.h>
33 #include <vnet/geneve/geneve.h>
35 #include <vnet/policer/xlate.h>
36 #include <vnet/policer/policer.h>
38 #include <vlib/vlib.h>
39 #include <vlib/pci/pci.h>
40 #include <vlib/unix/unix.h>
41 #include <vlibapi/api.h>
42 #include <vlibmemory/api.h>
44 #include <vnet/qos/qos_types.h>
45 
46 #include <vnet/ethernet/ethernet.h>
48 #include <vnet/l2/l2_vtr.h>
49 
50 #include <vpp/api/vpe_msg_enum.h>
51 #include <vpp/api/types.h>
52 
53 #include <vnet/bonding/node.h>
54 
55 #include <vnet/format_fns.h>
56 
57 #define vl_typedefs /* define message structures */
58 #include <vpp/api/vpe_all_api_h.h>
59 #undef vl_typedefs
60 
61 #define vl_endianfun /* define message structures */
62 #include <vpp/api/vpe_all_api_h.h>
63 #undef vl_endianfun
64 
65 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
66 
67 #define FINISH \
68  vec_add1 (s, 0); \
69  vl_print (handle, (char *)s); \
70  vec_free (s); \
71  return handle;
72 
73 
75  (vl_api_create_loopback_t * mp, void *handle)
76 {
77  u8 *s;
78 
79  s = format (0, "SCRIPT: create_loopback ");
80  s = format (s, "mac %U ", format_ethernet_address, &mp->mac_address);
81 
82  FINISH;
83 }
84 
86  (vl_api_create_loopback_instance_t * mp, void *handle)
87 {
88  u8 *s;
89 
90  s = format (0, "SCRIPT: create_loopback ");
91  s = format (s, "mac %U ", format_ethernet_address, &mp->mac_address);
92  s = format (s, "instance %d ", mp->user_instance);
93 
94  FINISH;
95 }
96 
98  (vl_api_delete_loopback_t * mp, void *handle)
99 {
100  u8 *s;
101 
102  s = format (0, "SCRIPT: delete_loopback ");
103  s = format (s, "sw_if_index %d ", mp->sw_if_index);
104 
105  FINISH;
106 }
107 
109  (vl_api_sw_interface_set_flags_t * mp, void *handle)
110 {
111  u8 *s;
112  s = format (0, "SCRIPT: sw_interface_set_flags ");
113 
114  s = format (s, "sw_if_index %d ", mp->sw_if_index);
115 
117  s = format (s, "admin-up ");
118  else
119  s = format (s, "admin-down ");
120 
121  FINISH;
122 }
123 
124 __clib_unused
127 {
128  u8 *s;
129  s = format (0, "SCRIPT: sw_interface_set_rx_placement ");
130 
131  s = format (s, "sw_if_index %d ", mp->sw_if_index);
132 
133  s = format (s, "queue %d ", mp->queue_id);
134  if (mp->is_main)
135  s = format (s, "main ");
136  else
137  s = format (s, "worker %d ", mp->worker_id);
138 
139  FINISH;
140 }
141 
144 {
145  u8 *s;
146  u32 sw_if_index = (mp->sw_if_index);
147 
148  s = format (0, "SCRIPT: sw_interface_rx_placement_dump ");
149 
150  if (sw_if_index != ~0)
151  s = format (s, "sw_if_index %d ", sw_if_index);
152 
153  FINISH;
154 }
155 
157  (vl_api_sw_interface_event_t * mp, void *handle)
158 {
159  u8 *s;
160  s = format (0, "SCRIPT: sw_interface_event ");
161 
162  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
163 
165  s = format (s, "admin-up ");
166  else
167  s = format (s, "admin-down ");
168 
169  if ((mp->flags) & IF_STATUS_API_FLAG_LINK_UP)
170  s = format (s, "link-up");
171  else
172  s = format (s, "link-down");
173 
174  if (mp->deleted)
175  s = format (s, " deleted");
176 
177  FINISH;
178 }
179 
180 
183 {
184  u8 *s;
185 
186  s = format (0, "SCRIPT: sw_interface_add_del_address ");
187  s = format (s, "sw_if_index %d ", mp->sw_if_index);
188  s = format (s, "%U ", format_vl_api_prefix_t, &mp->prefix);
189  if (mp->is_add == 0)
190  s = format (s, "del ");
191  if (mp->del_all)
192  s = format (s, "del-all ");
193 
194  FINISH;
195 }
196 
198  (vl_api_sw_interface_set_table_t * mp, void *handle)
199 {
200  u8 *s;
201 
202  s = format (0, "SCRIPT: sw_interface_set_table ");
203 
204  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
205 
206  if (mp->vrf_id)
207  s = format (s, "vrf %d ", (mp->vrf_id));
208 
209  if (mp->is_ipv6)
210  s = format (s, "ipv6 ");
211 
212  FINISH;
213 }
214 
217 {
218  u8 *s;
219 
220  s = format (0, "SCRIPT: sw_interface_set_mpls_enable ");
221 
222  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
223 
224  if (mp->enable == 0)
225  s = format (s, "disable");
226 
227  FINISH;
228 }
229 
231  (vl_api_sw_interface_set_vpath_t * mp, void *handle)
232 {
233  u8 *s;
234 
235  s = format (0, "SCRIPT: sw_interface_set_vpath ");
236 
237  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
238 
239  if (mp->enable)
240  s = format (s, "enable ");
241  else
242  s = format (s, "disable ");
243 
244  FINISH;
245 }
246 
249 {
250  u8 *s;
251 
252  s = format (0, "SCRIPT: sw_interface_set_vxlan_bypass ");
253 
254  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
255 
256  if (mp->is_ipv6)
257  s = format (s, "ip6 ");
258 
259  if (mp->enable)
260  s = format (s, "enable ");
261  else
262  s = format (s, "disable ");
263 
264  FINISH;
265 }
266 
269 {
270  u8 *s;
271 
272  s = format (0, "SCRIPT: sw_interface_set_geneve_bypass ");
273 
274  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
275 
276  if (mp->is_ipv6)
277  s = format (s, "ip6 ");
278 
279  if (mp->enable)
280  s = format (s, "enable ");
281  else
282  s = format (s, "disable ");
283 
284  FINISH;
285 }
286 
289 {
290  u8 *s;
291 
292  s = format (0, "SCRIPT: sw_interface_set_l2_xconnect ");
293 
294  s = format (s, "sw_if_index %d ", (mp->rx_sw_if_index));
295 
296  if (mp->enable)
297  {
298  s = format (s, "tx_sw_if_index %d ", (mp->tx_sw_if_index));
299  }
300  else
301  s = format (s, "delete ");
302 
303  FINISH;
304 }
305 
308 {
309  u8 *s;
310 
311  s = format (0, "SCRIPT: sw_interface_set_l2_bridge ");
312 
313  s = format (s, "sw_if_index %d ", (mp->rx_sw_if_index));
314 
315  if (mp->enable)
316  {
317  s = format (s, "bd_id %d shg %d ", (mp->bd_id), mp->shg);
318  if (L2_API_PORT_TYPE_BVI == (mp->port_type))
319  s = format (s, "bvi ");
320  if (L2_API_PORT_TYPE_UU_FWD == (mp->port_type))
321  s = format (s, "uu-fwd ");
322  s = format (s, "enable");
323  }
324  else
325  s = format (s, "disable ");
326 
327  FINISH;
328 }
329 
331  (vl_api_bridge_domain_add_del_t * mp, void *handle)
332 {
333  u8 *s;
334 
335  s = format (0, "SCRIPT: bridge_domain_add_del ");
336 
337  s = format (s, "bd_id %d ", (mp->bd_id));
338 
339  if (mp->is_add)
340  {
341  if (mp->bd_tag[0])
342  s = format (s, "bd_tag %s ", mp->bd_tag);
343  s = format (s, "flood %d uu-flood %d ", mp->flood, mp->uu_flood);
344  s = format (s, "forward %d learn %d ", mp->forward, mp->learn);
345  s = format (s, "arp-term %d mac-age %d", mp->arp_term, mp->mac_age);
346  }
347  else
348  s = format (s, "del ");
349 
350  FINISH;
351 }
352 
355 {
356  u8 *s;
357 
358  s = format (0, "SCRIPT: bridge_domain_set_mac_age ");
359 
360  s = format (s, "bd_id %d ", (mp->bd_id));
361 
362  s = format (s, "mac-age %d", mp->mac_age);
363 
364  FINISH;
365 }
366 
368  (vl_api_bridge_domain_dump_t * mp, void *handle)
369 {
370  u8 *s;
371  u32 bd_id = (mp->bd_id);
372 
373  s = format (0, "SCRIPT: bridge_domain_dump ");
374 
375  if (bd_id != ~0)
376  s = format (s, "bd_id %d ", bd_id);
377 
378  FINISH;
379 }
380 
382  (vl_api_l2fib_flush_all_t * mp, void *handle)
383 {
384  u8 *s;
385 
386  s = format (0, "SCRIPT: l2fib_flush_all ");
387 
388  FINISH;
389 }
390 
391 
393  (vl_api_l2fib_flush_bd_t * mp, void *handle)
394 {
395  u8 *s;
396  u32 bd_id = (mp->bd_id);
397 
398  s = format (0, "SCRIPT: l2fib_flush_bd ");
399  s = format (s, "bd_id %d ", bd_id);
400 
401  FINISH;
402 }
403 
405  (vl_api_l2fib_flush_int_t * mp, void *handle)
406 {
407  u8 *s;
408  u32 sw_if_index = (mp->sw_if_index);
409 
410  s = format (0, "SCRIPT: l2fib_flush_int ");
411  s = format (s, "sw_if_index %d ", sw_if_index);
412 
413  FINISH;
414 }
415 
416 static void *vl_api_l2fib_add_del_t_print
417  (vl_api_l2fib_add_del_t * mp, void *handle)
418 {
419  u8 *s;
420 
421  s = format (0, "SCRIPT: l2fib_add_del ");
422 
423  s = format (s, "mac %U ", format_ethernet_address, mp->mac);
424 
425  s = format (s, "bd_id %d ", (mp->bd_id));
426 
427 
428  if (mp->is_add)
429  {
430  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
431  if (mp->static_mac)
432  s = format (s, "%s", "static ");
433  if (mp->filter_mac)
434  s = format (s, "%s", "filter ");
435  if (mp->bvi_mac)
436  s = format (s, "%s", "bvi ");
437  }
438  else
439  {
440  s = format (s, "del ");
441  }
442 
443  FINISH;
444 }
445 
446 static void *
448 {
449  u8 *s;
450  u32 flags = (mp->feature_bitmap);
451 
452  s = format (0, "SCRIPT: l2_flags ");
453 
454  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
455 
456  if (flags & L2_LEARN)
457  s = format (s, "learn ");
458  if (flags & L2_FWD)
459  s = format (s, "forward ");
460  if (flags & L2_FLOOD)
461  s = format (s, "flood ");
462  if (flags & L2_UU_FLOOD)
463  s = format (s, "uu-flood ");
464  if (flags & L2_ARP_TERM)
465  s = format (s, "arp-term ");
466 
467  if (mp->is_set == 0)
468  s = format (s, "clear ");
469 
470  FINISH;
471 }
472 
473 static void *vl_api_bridge_flags_t_print
474  (vl_api_bridge_flags_t * mp, void *handle)
475 {
476  u8 *s;
477  u32 flags = (mp->flags);
478 
479  s = format (0, "SCRIPT: bridge_flags ");
480 
481  s = format (s, "bd_id %d ", (mp->bd_id));
482 
483  if (flags & BRIDGE_API_FLAG_LEARN)
484  s = format (s, "learn ");
485  if (flags & BRIDGE_API_FLAG_FWD)
486  s = format (s, "forward ");
487  if (flags & BRIDGE_API_FLAG_FLOOD)
488  s = format (s, "flood ");
489  if (flags & BRIDGE_API_FLAG_UU_FLOOD)
490  s = format (s, "uu-flood ");
491  if (flags & BRIDGE_API_FLAG_ARP_TERM)
492  s = format (s, "arp-term ");
493 
494  if (mp->is_set == 0)
495  s = format (s, "clear ");
496 
497  FINISH;
498 }
499 
501  (vl_api_bd_ip_mac_add_del_t * mp, void *handle)
502 {
503  u8 *s;
504 
505  s = format (0, "SCRIPT: bd_ip_mac_add_del ");
506  s = format (s, "bd_id %d ", (mp->entry.bd_id));
507 
508  s = format (s, "%U ", format_vl_api_address, &mp->entry.ip);
509  s = format (s, "%U ", format_vl_api_mac_address, &mp->entry.mac);
510  if (mp->is_add == 0)
511  s = format (s, "del ");
512 
513  FINISH;
514 }
515 
517  (vl_api_bd_ip_mac_flush_t * mp, void *handle)
518 {
519  u8 *s;
520 
521  s = format (0, "SCRIPT: bd_ip_mac_flush ");
522  s = format (s, "bd_id %d ", (mp->bd_id));
523 
524  FINISH;
525 }
526 
527 __clib_unused
528  static void *vl_api_bd_ip_mac_dump_t_print
529  (vl_api_bd_ip_mac_dump_t * mp, void *handle)
530 {
531  u8 *s;
532 
533  s = format (0, "SCRIPT: bd_ip_mac_dump ");
534 
535  FINISH;
536 }
537 
538 static void *vl_api_tap_create_v2_t_print
539  (vl_api_tap_create_v2_t * mp, void *handle)
540 {
541  u8 *s;
542  u8 null_mac[6];
543 
544  clib_memset (null_mac, 0, sizeof (null_mac));
545 
546  s = format (0, "SCRIPT: tap_create_v2 ");
547  s = format (s, "id %u ", (mp->id));
548  if (memcmp (mp->mac_address, null_mac, 6))
549  s = format (s, "mac-address %U ",
551  if (memcmp (mp->host_mac_addr, null_mac, 6))
552  s = format (s, "host-mac-addr %U ",
554  if (mp->host_if_name_set)
555  s = format (s, "host-if-name %s ", mp->host_if_name);
556  if (mp->host_namespace_set)
557  s = format (s, "host-ns %s ", mp->host_namespace);
558  if (mp->host_bridge_set)
559  s = format (s, "host-bridge %s ", mp->host_bridge);
560  if (mp->host_ip4_prefix_set)
561  s = format (s, "host-ip4-addr %U/%d ", format_ip4_address,
562  mp->host_ip4_prefix.address, mp->host_ip4_prefix.len);
563  if (mp->host_ip6_prefix_set)
564  s = format (s, "host-ip6-addr %U/%d ", format_ip6_address,
565  mp->host_ip6_prefix.address, mp->host_ip6_prefix.len);
566  if (mp->host_ip4_gw_set)
567  s =
568  format (s, "host-ip4-gw %U ", format_ip4_address,
569  mp->host_ip4_prefix.address);
570  if (mp->host_ip6_gw_set)
571  s =
572  format (s, "host-ip6-gw %U ", format_ip6_address,
573  mp->host_ip6_prefix.address);
574  if (mp->num_rx_queues)
575  s = format (s, "num_rx_queues %u ", mp->num_rx_queues);
576  if (mp->tx_ring_sz)
577  s = format (s, "tx-ring-size %u ", (mp->tx_ring_sz));
578  if (mp->rx_ring_sz)
579  s = format (s, "rx-ring-size %u ", (mp->rx_ring_sz));
580  if (mp->host_mtu_set)
581  s = format (s, "host-mtu-size %u ", (mp->host_mtu_size));
582  if ((mp->tap_flags) & 0x1)
583  s = format (s, "gso-enabled ");
584  if ((mp->tap_flags) & 0x2)
585  s = format (s, "csum-offload-enabled");
586  FINISH;
587 }
588 
589 static void *vl_api_tap_delete_v2_t_print
590  (vl_api_tap_delete_v2_t * mp, void *handle)
591 {
592  u8 *s;
593 
594  s = format (0, "SCRIPT: tap_delete_v2 ");
595  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
596 
597  FINISH;
598 }
599 
602 {
603  u8 *s;
604 
605  s = format (0, "SCRIPT: sw_interface_tap_v2_dump ");
606 
607  FINISH;
608 }
609 
610 __clib_unused
612  (vl_api_virtio_pci_create_t * mp, void *handle)
613 {
614  u8 *s;
615  u8 null_mac[6];
616 
617  clib_memset (null_mac, 0, sizeof (null_mac));
618 
619  s = format (0, "SCRIPT: virtio_pci_create ");
620  s = format (s, "pci_addr %U ", format_vlib_pci_addr, (mp->pci_addr));
621  if (memcmp (mp->mac_address, null_mac, 6))
622  s = format (s, "mac-address %U ",
624  if (mp->features)
625  s = format (s, "features 0x%llx ", clib_net_to_host_u64 (mp->features));
626  if (mp->gso_enabled)
627  s = format (s, "gso-enabled ");
628  if (mp->checksum_offload_enabled)
629  s = format (s, "checksum_offload_enabled");
630  FINISH;
631 }
632 
633 __clib_unused
635  (vl_api_virtio_pci_delete_t * mp, void *handle)
636 {
637  u8 *s;
638 
639  s = format (0, "SCRIPT: virtio_pci_delete ");
640  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
641 
642  FINISH;
643 }
644 
645 __clib_unused
648 {
649  u8 *s;
650 
651  s = format (0, "SCRIPT: sw_interface_virtio_pci_dump ");
652 
653  FINISH;
654 }
655 
656 static void *vl_api_bond_create_t_print
657  (vl_api_bond_create_t * mp, void *handle)
658 {
659  u8 *s;
660  u8 null_mac[6];
661 
662  clib_memset (null_mac, 0, sizeof (null_mac));
663 
664  s = format (0, "SCRIPT: bond_create ");
665  if (memcmp (mp->mac_address, null_mac, 6))
666  s = format (s, "mac-address %U ",
668  if (mp->mode)
669  s = format (s, "mode %U ", format_bond_mode, ntohl (mp->mode));
670  if (mp->lb)
671  s = format (s, "lb %U ", format_bond_load_balance, ntohl (mp->lb));
672  if (mp->numa_only)
673  s = format (s, "numa-only is set in lacp mode");
674  if (mp->id != ~0)
675  s = format (s, "id %u ", (mp->id));
676  FINISH;
677 }
678 
679 static void *vl_api_bond_delete_t_print
680  (vl_api_bond_delete_t * mp, void *handle)
681 {
682  u8 *s;
683 
684  s = format (0, "SCRIPT: bond_delete ");
685  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
686 
687  FINISH;
688 }
689 
690 static void *vl_api_bond_enslave_t_print
691  (vl_api_bond_enslave_t * mp, void *handle)
692 {
693  u8 *s;
694 
695  s = format (0, "SCRIPT: bond_enslave ");
696  s = format (s, "bond_sw_if_index %u ", (mp->bond_sw_if_index));
697  s = format (s, "sw_if_index %u ", (mp->sw_if_index));
698  if (mp->is_passive)
699  s = format (s, "passive ");
700  if (mp->is_long_timeout)
701  s = format (s, "long-timeout ");
702 
703  FINISH;
704 }
705 
708 {
709  u8 *s;
710 
711  s = format (0, "SCRIPT: sw_interface_set_bond_weight ");
712  s = format (s, "sw_if_index %u ", ntohl (mp->sw_if_index));
713  s = format (s, "weight %u ", ntohl (mp->weight));
714 
715  FINISH;
716 }
717 
719  (vl_api_bond_detach_slave_t * mp, void *handle)
720 {
721  u8 *s;
722 
723  s = format (0, "SCRIPT: bond_detach_slave ");
724  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
725 
726  FINISH;
727 }
728 
730  (vl_api_sw_interface_bond_dump_t * mp, void *handle)
731 {
732  u8 *s;
733 
734  s = format (0, "SCRIPT: sw_interface_bond_dump ");
735 
736  FINISH;
737 }
738 
740  (vl_api_sw_interface_slave_dump_t * mp, void *handle)
741 {
742  u8 *s;
743 
744  s = format (0, "SCRIPT: sw_interface_slave_dump ");
745  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
746 
747  FINISH;
748 }
749 
751  (vl_api_ip_route_add_del_t * mp, void *handle)
752 {
753  u8 *s, p;
754 
755  s = format (0, "SCRIPT: ip_route_add_del ");
756  if (mp->is_add == 0)
757  s = format (s, "del ");
758 
759  s = format (s, "%U", format_vl_api_prefix, &mp->route.prefix);
760 
761  for (p = 0; p < mp->route.n_paths; p++)
762  s = format (s, " [%U]", format_vl_api_fib_path, &mp->route.paths[p]);
763 
764  FINISH;
765 }
766 
768  (vl_api_mpls_route_add_del_t * mp, void *handle)
769 {
770  u8 *s, p;
771 
772  s = format (0, "SCRIPT: mpls_route_add_del ");
773 
774  if (mp->mr_is_add)
775  s = format (s, "add ");
776  else
777  s = format (s, "del ");
778 
779  s = format (s, "table %d ", (mp->mr_route.mr_table_id));
780  s = format (s, "%d ", (mp->mr_route.mr_label));
781 
782  if (mp->mr_route.mr_eos)
783  s = format (s, "eos ");
784  else
785  s = format (s, "non-eos ");
786 
787  if (mp->mr_route.mr_is_multicast)
788  s = format (s, "multicast ");
789 
790  for (p = 0; p < mp->mr_route.mr_n_paths; p++)
791  s =
792  format (s, " [%U]", format_vl_api_fib_path, &mp->mr_route.mr_paths[p]);
793 
794 
795  FINISH;
796 }
797 
799  (vl_api_ip_table_add_del_t * mp, void *handle)
800 {
801  u8 *s;
802 
803  s = format (0, "SCRIPT: ip_table_add_del ");
804  if (mp->is_add)
805  s = format (s, "add ");
806  else
807  s = format (s, "del ");
808  if (mp->table.is_ip6)
809  s = format (s, "ip6 ");
810  s = format (s, "table %d ", (mp->table.table_id));
811  s = format (s, "%s ", mp->table.name);
812 
813  FINISH;
814 }
815 
817  (vl_api_mpls_table_add_del_t * mp, void *handle)
818 {
819  u8 *s;
820 
821  s = format (0, "SCRIPT: mpls_table_add_del ");
822  if (mp->mt_is_add)
823  s = format (s, "add ");
824  else
825  s = format (s, "del ");
826  s = format (s, "table %d ", (mp->mt_table.mt_table_id));
827 
828  FINISH;
829 }
830 
832  (vl_api_mpls_tunnel_add_del_t * mp, void *handle)
833 {
834  u8 *s, p;
835 
836  s = format (0, "SCRIPT: mpls_tunnel_add_del ");
837 
838  if (mp->mt_is_add == 0)
839  s = format (s, "del sw_if_index %d ", (mp->mt_tunnel.mt_sw_if_index));
840  else
841  s = format (s, "sw_if_index %d ", (mp->mt_tunnel.mt_sw_if_index));
842 
843 
844  if (mp->mt_tunnel.mt_l2_only)
845  s = format (s, "l2-only ");
846  if (mp->mt_tunnel.mt_is_multicast)
847  s = format (s, "multicast ");
848  if (mp->mt_tunnel.mt_tunnel_index)
849  s = format (s, "tunnel-index ");
850 
851  for (p = 0; p < mp->mt_tunnel.mt_n_paths; p++)
852  s = format (s, " [%U]", format_vl_api_fib_path,
853  &mp->mt_tunnel.mt_paths[p]);
854 
855  FINISH;
856 }
857 
859  (vl_api_sr_mpls_policy_add_t * mp, void *handle)
860 {
861  u8 *s;
862 
863  s = format (0, "SCRIPT: sr_mpls_policy_add ");
864 
865  s = format (s, "bsid %d ", (mp->bsid));
866 
867  if (mp->weight != htonl ((u32) 1))
868  s = format (s, "%d ", (mp->weight));
869 
870  if (mp->type)
871  s = format (s, "spray ");
872 
873  if (mp->n_segments)
874  {
875  int i;
876  for (i = 0; i < mp->n_segments; i++)
877  s = format (s, "next %d ", (mp->segments[i]));
878  }
879 
880  FINISH;
881 }
882 
884  (vl_api_sr_mpls_policy_del_t * mp, void *handle)
885 {
886  u8 *s;
887 
888  s = format (0, "SCRIPT: sr_mpls_policy_del ");
889 
890  s = format (s, "bsid %d ", (mp->bsid));
891 
892  FINISH;
893 }
894 
897 {
898  u8 *s;
899 
900  s = format (0, "SCRIPT: sw_interface_set_unnumbered ");
901 
902  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
903 
904  s = format (s, "unnum_if_index %d ", (mp->unnumbered_sw_if_index));
905 
906  if (mp->is_add == 0)
907  s = format (s, "del ");
908 
909  FINISH;
910 }
911 
913  (vl_api_create_vlan_subif_t * mp, void *handle)
914 {
915  u8 *s;
916 
917  s = format (0, "SCRIPT: create_vlan_subif ");
918 
919  if (mp->sw_if_index)
920  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
921 
922  if (mp->vlan_id)
923  s = format (s, "vlan_id %d ", (mp->vlan_id));
924 
925  FINISH;
926 }
927 
928 #define foreach_create_subif_flag \
929 _(0, "no_tags") \
930 _(1, "one_tag") \
931 _(2, "two_tags") \
932 _(3, "dot1ad") \
933 _(4, "exact_match") \
934 _(5, "default_sub") \
935 _(6, "outer_vlan_id_any") \
936 _(7, "inner_vlan_id_any")
937 
938 static void *vl_api_create_subif_t_print
939  (vl_api_create_subif_t * mp, void *handle)
940 {
941  u8 *s;
942 
943  s = format (0, "SCRIPT: create_subif ");
944 
945  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
946 
947  s = format (s, "sub_id %d ", (mp->sub_id));
948 
949  if (mp->outer_vlan_id)
950  s = format (s, "outer_vlan_id %d ", (mp->outer_vlan_id));
951 
952  if (mp->inner_vlan_id)
953  s = format (s, "inner_vlan_id %d ", (mp->inner_vlan_id));
954 
955 #define _(a,b) if (mp->sub_if_flags & (1 << a)) s = format (s, "%s ", b);
957 #undef _
958 
959  FINISH;
960 }
961 
962 static void *vl_api_delete_subif_t_print
963  (vl_api_delete_subif_t * mp, void *handle)
964 {
965  u8 *s;
966 
967  s = format (0, "SCRIPT: delete_subif ");
968  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
969 
970  FINISH;
971 }
972 
973 static void *
975  void *handle)
976 {
977  u8 *s;
978 
979  s = format (0, "SCRIPT: ip_table_replace_begin ");
980 
981  s = format (s, "v%s-table %d ",
982  mp->table.is_ip6 ? "6" : "4", (mp->table.table_id));
983 
984  FINISH;
985 }
986 
987 static void *
989 {
990  u8 *s;
991 
992  s = format (0, "SCRIPT: ip_table_flush ");
993 
994  s = format (s, "v%s-table %d ",
995  mp->table.is_ip6 ? "6" : "4", (mp->table.table_id));
996 
997  FINISH;
998 }
999 
1000 static void *
1002  void *handle)
1003 {
1004  u8 *s;
1005 
1006  s = format (0, "SCRIPT: ip_table_replace_end ");
1007 
1008  s = format (s, "v%s-table %d ",
1009  mp->table.is_ip6 ? "6" : "4", (mp->table.table_id));
1010 
1011  FINISH;
1012 }
1013 
1015  (vl_api_set_ip_flow_hash_t * mp, void *handle)
1016 {
1017  u8 *s;
1018 
1019  s = format (0, "SCRIPT: set_ip_flow_hash ");
1020 
1021  s = format (s, "vrf_id %d ", (mp->vrf_id));
1022 
1023  if (mp->src)
1024  s = format (s, "src ");
1025 
1026  if (mp->dst)
1027  s = format (s, "dst ");
1028 
1029  if (mp->sport)
1030  s = format (s, "sport ");
1031 
1032  if (mp->dport)
1033  s = format (s, "dport ");
1034 
1035  if (mp->proto)
1036  s = format (s, "proto ");
1037 
1038  if (mp->reverse)
1039  s = format (s, "reverse ");
1040 
1041  if (mp->is_ipv6 != 0)
1042  s = format (s, "ipv6 ");
1043 
1044  FINISH;
1045 }
1046 
1047 
1049  (vl_api_l2_patch_add_del_t * mp, void *handle)
1050 {
1051  u8 *s;
1052 
1053  s = format (0, "SCRIPT: l2_patch_add_del ");
1054 
1055  s = format (s, "rx_sw_if_index %d ", (mp->rx_sw_if_index));
1056 
1057  s = format (s, "tx_sw_if_index %d ", (mp->tx_sw_if_index));
1058 
1059  if (mp->is_add == 0)
1060  s = format (s, "del ");
1061 
1062  FINISH;
1063 }
1064 
1066  (vl_api_sr_localsid_add_del_t * mp, void *handle)
1067 {
1068  vnet_main_t *vnm = vnet_get_main ();
1069  u8 *s;
1070 
1071  s = format (0, "SCRIPT: sr_localsid_add_del ");
1072 
1073  switch (mp->behavior)
1074  {
1075  case SR_BEHAVIOR_END:
1076  s = format (s, "Address: %U\nBehavior: End",
1077  format_ip6_address, (ip6_address_t *) mp->localsid.addr);
1078  s = format (s, (mp->end_psp ? "End.PSP: True" : "End.PSP: False"));
1079  break;
1080  case SR_BEHAVIOR_X:
1081  s =
1082  format (s,
1083  "Address: %U\nBehavior: X (Endpoint with Layer-3 cross-connect)"
1084  "\nIface: %U\nNext hop: %U", format_ip6_address,
1085  (ip6_address_t *) mp->localsid.addr,
1088  s = format (s, (mp->end_psp ? "End.PSP: True" : "End.PSP: False"));
1089  break;
1090  case SR_BEHAVIOR_DX4:
1091  s =
1092  format (s,
1093  "Address: %U\nBehavior: DX4 (Endpoint with decapsulation with IPv4 cross-connect)"
1094  "\nIface: %U\nNext hop: %U", format_ip6_address,
1095  (ip6_address_t *) mp->localsid.addr,
1098  break;
1099  case SR_BEHAVIOR_DX6:
1100  s =
1101  format (s,
1102  "Address: %U\nBehavior: DX6 (Endpoint with decapsulation with IPv6 cross-connect)"
1103  "\nIface: %UNext hop: %U", format_ip6_address,
1104  (ip6_address_t *) mp->localsid.addr,
1107  break;
1108  case SR_BEHAVIOR_DX2:
1109  s =
1110  format (s,
1111  "Address: %U\nBehavior: DX2 (Endpoint with decapulation and Layer-2 cross-connect)"
1112  "\nIface: %U", format_ip6_address,
1113  (ip6_address_t *) mp->localsid.addr,
1115  break;
1116  case SR_BEHAVIOR_DT6:
1117  s =
1118  format (s,
1119  "Address: %U\nBehavior: DT6 (Endpoint with decapsulation and specific IPv6 table lookup)"
1120  "\nTable: %u", format_ip6_address,
1121  (ip6_address_t *) mp->localsid.addr, (mp->fib_table));
1122  break;
1123  case SR_BEHAVIOR_DT4:
1124  s =
1125  format (s,
1126  "Address: %U\nBehavior: DT4 (Endpoint with decapsulation and specific IPv4 table lookup)"
1127  "\nTable: %u", format_ip6_address,
1128  (ip6_address_t *) mp->localsid.addr, (mp->fib_table));
1129  break;
1130  default:
1131  if (mp->behavior >= SR_BEHAVIOR_LAST)
1132  {
1133  s = format (s, "Address: %U\n Behavior: %u",
1135  mp->behavior);
1136  }
1137  else
1138  //Should never get here...
1139  s = format (s, "Internal error");
1140  break;
1141  }
1142  FINISH;
1143 }
1144 
1146  (vl_api_sr_steering_add_del_t * mp, void *handle)
1147 {
1148  u8 *s;
1149 
1150  s = format (0, "SCRIPT: sr_steering_add_del ");
1151 
1152  s = format (s, (mp->is_del ? "Del: True" : "Del: False"));
1153 
1154  switch (mp->traffic_type)
1155  {
1156  case SR_STEER_L2:
1157  s = format (s, "Traffic type: L2 iface: %u", (mp->sw_if_index));
1158  break;
1159  case SR_STEER_IPV4:
1160  s = format (s, "Traffic type: IPv4 %U/%u", format_ip4_address,
1161  (ip4_address_t *) mp->prefix_addr, (mp->mask_width));
1162  break;
1163  case SR_STEER_IPV6:
1164  s = format (s, "Traffic type: IPv6 %U/%u", format_ip6_address,
1165  (ip6_address_t *) mp->prefix_addr, (mp->mask_width));
1166  break;
1167  default:
1168  s = format (s, "Traffic type: Unknown(%u)", mp->traffic_type);
1169  break;
1170  }
1171  s = format (s, "BindingSID: %U", format_ip6_address,
1172  (ip6_address_t *) mp->bsid_addr);
1173 
1174  s = format (s, "SR Policy Index: %u", (mp->sr_policy_index));
1175 
1176  s = format (s, "FIB_table: %u", (mp->table_id));
1177 
1178  FINISH;
1179 }
1180 
1181 static void *vl_api_sr_policy_add_t_print
1182  (vl_api_sr_policy_add_t * mp, void *handle)
1183 {
1184  u8 *s;
1185 
1186  ip6_address_t *segments = 0, *seg;
1187  ip6_address_t *this_address = (ip6_address_t *) mp->sids.sids;
1188 
1189  int i;
1190  for (i = 0; i < mp->sids.num_sids; i++)
1191  {
1192  vec_add2 (segments, seg, 1);
1193  clib_memcpy (seg->as_u8, this_address->as_u8, sizeof (*this_address));
1194  this_address++;
1195  }
1196 
1197  s = format (0, "SCRIPT: sr_policy_add ");
1198 
1199  s = format (s, "BSID: %U", format_ip6_address,
1200  (ip6_address_t *) mp->bsid_addr);
1201 
1202  s =
1203  format (s,
1204  (mp->is_encap ? "Behavior: Encapsulation" :
1205  "Behavior: SRH insertion"));
1206 
1207  s = format (s, "FIB_table: %u", (mp->fib_table));
1208 
1209  s = format (s, (mp->type ? "Type: Default" : "Type: Spray"));
1210 
1211  s = format (s, "SID list weight: %u", (mp->weight));
1212 
1213  s = format (s, "{");
1214  vec_foreach (seg, segments)
1215  {
1216  s = format (s, "%U, ", format_ip6_address, seg);
1217  }
1218  s = format (s, "\b\b } ");
1219 
1220  FINISH;
1221 }
1222 
1223 static void *vl_api_sr_policy_mod_t_print
1224  (vl_api_sr_policy_mod_t * mp, void *handle)
1225 {
1226  u8 *s;
1227 
1228  ip6_address_t *segments = 0, *seg;
1229  ip6_address_t *this_address = (ip6_address_t *) mp->sids.sids;
1230 
1231  int i;
1232  for (i = 0; i < mp->sids.num_sids; i++)
1233  {
1234  vec_add2 (segments, seg, 1);
1235  clib_memcpy (seg->as_u8, this_address->as_u8, sizeof (*this_address));
1236  this_address++;
1237  }
1238 
1239  s = format (0, "SCRIPT: sr_policy_mod ");
1240 
1241  s = format (s, "BSID: %U", format_ip6_address,
1242  (ip6_address_t *) mp->bsid_addr);
1243 
1244  s = format (s, "SR Policy index: %u", (mp->sr_policy_index));
1245 
1246  s = format (s, "Operation: %u", mp->operation);
1247 
1248  s = format (s, "SID list index: %u", (mp->sl_index));
1249 
1250  s = format (s, "SID list weight: %u", (mp->weight));
1251 
1252  s = format (s, "{");
1253  vec_foreach (seg, segments)
1254  {
1255  s = format (s, "%U, ", format_ip6_address, seg);
1256  }
1257  s = format (s, "\b\b } ");
1258 
1259  FINISH;
1260 }
1261 
1262 static void *vl_api_sr_policy_del_t_print
1263  (vl_api_sr_policy_del_t * mp, void *handle)
1264 {
1265  u8 *s;
1266 
1267  s = format (0, "SCRIPT: sr_policy_del ");
1268  s = format (s, "To be delivered. Good luck.");
1269  FINISH;
1270 }
1271 
1273  (vl_api_classify_add_del_table_t * mp, void *handle)
1274 {
1275  u8 *s;
1276  int i;
1277 
1278  s = format (0, "SCRIPT: classify_add_del_table ");
1279 
1280  if (mp->is_add == 0)
1281  {
1282  s = format (s, "table %d ", (mp->table_index));
1283  s = format (s, "%s ", mp->del_chain ? "del-chain" : "del");
1284  }
1285  else
1286  {
1287  s = format (s, "nbuckets %d ", (mp->nbuckets));
1288  s = format (s, "memory_size %d ", (mp->memory_size));
1289  s = format (s, "skip %d ", (mp->skip_n_vectors));
1290  s = format (s, "match %d ", (mp->match_n_vectors));
1291  s = format (s, "next-table %d ", (mp->next_table_index));
1292  s = format (s, "miss-next %d ", (mp->miss_next_index));
1293  s = format (s, "current-data-flag %d ", (mp->current_data_flag));
1294  if (mp->current_data_flag)
1295  s = format (s, "current-data-offset %d ", (mp->current_data_offset));
1296  s = format (s, "mask hex ");
1297  for (i = 0; i < (mp->match_n_vectors) * sizeof (u32x4); i++)
1298  s = format (s, "%02x", mp->mask[i]);
1299  vec_add1 (s, ' ');
1300  }
1301 
1302  FINISH;
1303 }
1304 
1307 {
1308  u8 *s;
1309  int i, limit = 0;
1310 
1311  s = format (0, "SCRIPT: classify_add_del_session ");
1312 
1313  s = format (s, "table_index %d ", (mp->table_index));
1314  s = format (s, "hit_next_index %d ", (mp->hit_next_index));
1315  s = format (s, "opaque_index %d ", (mp->opaque_index));
1316  s = format (s, "advance %d ", (mp->advance));
1317  s = format (s, "action %d ", mp->action);
1318  if (mp->action)
1319  s = format (s, "metadata %d ", (mp->metadata));
1320  if (mp->is_add == 0)
1321  s = format (s, "del ");
1322 
1323  s = format (s, "match hex ");
1324  for (i = 5 * sizeof (u32x4) - 1; i > 0; i--)
1325  {
1326  if (mp->match[i] != 0)
1327  {
1328  limit = i + 1;
1329  break;
1330  }
1331  }
1332 
1333  for (i = 0; i < limit; i++)
1334  s = format (s, "%02x", mp->match[i]);
1335 
1336  FINISH;
1337 }
1338 
1341 {
1342  u8 *s;
1343 
1344  s = format (0, "SCRIPT: classify_set_interface_ip_table ");
1345 
1346  if (mp->is_ipv6)
1347  s = format (s, "ipv6 ");
1348 
1349  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1350  s = format (s, "table %d ", (mp->table_index));
1351 
1352  FINISH;
1353 }
1354 
1357 {
1358  u8 *s;
1359 
1360  s = format (0, "SCRIPT: classify_set_interface_l2_tables ");
1361 
1362  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1363  s = format (s, "ip4-table %d ", (mp->ip4_table_index));
1364  s = format (s, "ip6-table %d ", (mp->ip6_table_index));
1365  s = format (s, "other-table %d ", (mp->other_table_index));
1366  s = format (s, "is-input %d ", mp->is_input);
1367 
1368  FINISH;
1369 }
1370 
1371 static void *vl_api_add_node_next_t_print
1372  (vl_api_add_node_next_t * mp, void *handle)
1373 {
1374  u8 *s;
1375 
1376  s = format (0, "SCRIPT: add_node_next ");
1377 
1378  s = format (0, "node %s next %s ", mp->node_name, mp->next_name);
1379 
1380  FINISH;
1381 }
1382 
1384  (vl_api_l2tpv3_create_tunnel_t * mp, void *handle)
1385 {
1386  u8 *s;
1387 
1388  s = format (0, "SCRIPT: l2tpv3_create_tunnel ");
1389 
1390  s = format (s, "client_address %U our_address %U ",
1392  (ip6_address_t *) (mp->client_address.un.ip6),
1393  format_ip6_address, (ip6_address_t *) (mp->our_address.un.ip6));
1394  s = format (s, "local_session_id %d ", (mp->local_session_id));
1395  s = format (s, "remote_session_id %d ", (mp->remote_session_id));
1396  s = format (s, "local_cookie %lld ",
1397  clib_net_to_host_u64 (mp->local_cookie));
1398  s = format (s, "remote_cookie %lld ",
1399  clib_net_to_host_u64 (mp->remote_cookie));
1400  if (mp->l2_sublayer_present)
1401  s = format (s, "l2-sublayer-present ");
1402 
1403  FINISH;
1404 }
1405 
1408 {
1409  u8 *s;
1410 
1411  s = format (0, "SCRIPT: l2tpv3_set_tunnel_cookies ");
1412 
1413  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1414 
1415  s = format (s, "new_local_cookie %llu ",
1416  clib_net_to_host_u64 (mp->new_local_cookie));
1417 
1418  s = format (s, "new_remote_cookie %llu ",
1419  clib_net_to_host_u64 (mp->new_remote_cookie));
1420 
1421  FINISH;
1422 }
1423 
1426 {
1427  u8 *s;
1428 
1429  s = format (0, "SCRIPT: l2tpv3_interface_enable_disable ");
1430 
1431  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1432 
1433  if (mp->enable_disable == 0)
1434  s = format (s, "del ");
1435 
1436  FINISH;
1437 }
1438 
1440  (vl_api_l2tpv3_set_lookup_key_t * mp, void *handle)
1441 {
1442  u8 *s;
1443  char *str = "unknown";
1444 
1445  s = format (0, "SCRIPT: l2tpv3_set_lookup_key ");
1446 
1447  switch (mp->key)
1448  {
1450  str = "lookup_v6_src";
1451  break;
1453  str = "lookup_v6_dst";
1454  break;
1455  case L2T_LOOKUP_SESSION_ID:
1456  str = "lookup_session_id";
1457  break;
1458  default:
1459  break;
1460  }
1461 
1462  s = format (s, "%s ", str);
1463 
1464  FINISH;
1465 }
1466 
1469 {
1470  u8 *s;
1471 
1472  s = format (0, "SCRIPT: sw_if_l2tpv3_tunnel_dump ");
1473 
1474  FINISH;
1475 }
1476 
1478  (vl_api_vxlan_add_del_tunnel_t * mp, void *handle)
1479 {
1480  u8 *s;
1481  s = format (0, "SCRIPT: vxlan_add_del_tunnel ");
1482 
1483  ip46_address_t src = to_ip46 (mp->is_ipv6, mp->src_address);
1484  ip46_address_t dst = to_ip46 (mp->is_ipv6, mp->dst_address);
1485 
1486  u8 is_grp = ip46_address_is_multicast (&dst);
1487  char *dst_name = is_grp ? "group" : "dst";
1488 
1489  s = format (s, "src %U ", format_ip46_address, &src, IP46_TYPE_ANY);
1490  s = format (s, "%s %U ", dst_name, format_ip46_address,
1491  &dst, IP46_TYPE_ANY);
1492 
1493  if (is_grp)
1494  s = format (s, "mcast_sw_if_index %d ", (mp->mcast_sw_if_index));
1495 
1496  if (mp->encap_vrf_id)
1497  s = format (s, "encap-vrf-id %d ", (mp->encap_vrf_id));
1498 
1499  s = format (s, "decap-next %d ", (mp->decap_next_index));
1500 
1501  s = format (s, "vni %d ", (mp->vni));
1502 
1503  s = format (s, "instance %d ", (mp->instance));
1504 
1505  if (mp->is_add == 0)
1506  s = format (s, "del ");
1507 
1508  FINISH;
1509 }
1510 
1512  (vl_api_vxlan_offload_rx_t * mp, void *handle)
1513 {
1514  u8 *s;
1515  s = format (0, "SCRIPT: vxlan_offload_rx ");
1516 
1517  s = format (s, "hw hw_if_index %d ", (mp->hw_if_index));
1518  s = format (s, "rx sw_if_index %d ", (mp->sw_if_index));
1519  if (!mp->enable)
1520  s = format (s, "del ");
1521 
1522  FINISH;
1523 }
1524 
1526  (vl_api_vxlan_tunnel_dump_t * mp, void *handle)
1527 {
1528  u8 *s;
1529 
1530  s = format (0, "SCRIPT: vxlan_tunnel_dump ");
1531 
1532  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1533 
1534  FINISH;
1535 }
1536 
1539 {
1540  u8 *s;
1541  s = format (0, "SCRIPT: vxlan_gbp_tunnel_add_del ");
1542 
1543  if (mp->is_add)
1544  s = format (s, "add ");
1545  else
1546  s = format (s, "del ");
1547 
1548  s = format (s, "instance %d ", (mp->tunnel.instance));
1549  s = format (s, "src %U ", format_vl_api_address, &mp->tunnel.src);
1550  s = format (s, "dst %U ", format_vl_api_address, &mp->tunnel.dst);
1551  s = format (s, "mcast_sw_if_index %d ", (mp->tunnel.mcast_sw_if_index));
1552  s = format (s, "encap_table_id %d ", (mp->tunnel.encap_table_id));
1553  s = format (s, "vni %d ", (mp->tunnel.vni));
1554  s = format (s, "sw_if_index %d ", (mp->tunnel.sw_if_index));
1555 
1556  FINISH;
1557 }
1558 
1560  (vl_api_vxlan_gbp_tunnel_dump_t * mp, void *handle)
1561 {
1562  u8 *s;
1563 
1564  s = format (0, "SCRIPT: vxlan_gbp_tunnel_dump ");
1565 
1566  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1567 
1568  FINISH;
1569 }
1570 
1573 {
1574  u8 *s;
1575 
1576  s = format (0, "SCRIPT: sw_interface_set_vxlan_gbp_bypass ");
1577 
1578  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1579  s = format (s, "%s ", (mp->is_ipv6 != 0) ? "ipv6" : "ipv4");
1580  s = format (s, "%s ", (mp->enable != 0) ? "enable" : "disable");
1581 
1582  FINISH;
1583 }
1584 
1586  (vl_api_geneve_add_del_tunnel_t * mp, void *handle)
1587 {
1588  u8 *s;
1589  s = format (0, "SCRIPT: geneve_add_del_tunnel ");
1590 
1591  ip46_address_t local;
1592  ip46_address_t remote;
1593  ip_address_decode (&mp->remote_address, &remote);
1594  ip_address_decode (&mp->local_address, &local);
1595 
1596  u8 is_grp = ip46_address_is_multicast (&remote);
1597  char *remote_name = is_grp ? "group" : "dst";
1598 
1599  s = format (s, "src %U ", format_ip46_address, &local, IP46_TYPE_ANY);
1600  s = format (s, "%s %U ", remote_name, format_ip46_address,
1601  &remote, IP46_TYPE_ANY);
1602 
1603  if (is_grp)
1604  s = format (s, "mcast_sw_if_index %d ", (mp->mcast_sw_if_index));
1605 
1606  if (mp->encap_vrf_id)
1607  s = format (s, "encap-vrf-id %d ", (mp->encap_vrf_id));
1608 
1609  s = format (s, "decap-next %d ", (mp->decap_next_index));
1610 
1611  s = format (s, "vni %d ", (mp->vni));
1612 
1613  if (mp->is_add == 0)
1614  s = format (s, "del ");
1615 
1616  FINISH;
1617 }
1618 
1620  (vl_api_geneve_tunnel_dump_t * mp, void *handle)
1621 {
1622  u8 *s;
1623 
1624  s = format (0, "SCRIPT: geneve_tunnel_dump ");
1625 
1626  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1627 
1628  FINISH;
1629 }
1630 
1632  (vl_api_gre_tunnel_add_del_t * mp, void *handle)
1633 {
1634  u8 *s;
1635 
1636  s = format (0, "SCRIPT: gre_tunnel_add_del ");
1637 
1638  s = format (s, "dst %U ", format_vl_api_address, &mp->tunnel.dst);
1639  s = format (s, "src %U ", format_vl_api_address, &mp->tunnel.src);
1640 
1641  s = format (s, "instance %d ", (mp->tunnel.instance));
1642 
1643  if (mp->tunnel.type == GRE_API_TUNNEL_TYPE_TEB)
1644  s = format (s, "teb ");
1645 
1646  if (mp->tunnel.type == GRE_API_TUNNEL_TYPE_ERSPAN)
1647  s = format (s, "erspan %d ", (mp->tunnel.session_id));
1648 
1649  if (mp->tunnel.outer_table_id)
1650  s = format (s, "outer-table-id %d ", mp->tunnel.outer_table_id);
1651 
1652  if (mp->is_add == 0)
1653  s = format (s, "del ");
1654 
1655  FINISH;
1656 }
1657 
1658 static void *vl_api_gre_tunnel_dump_t_print
1659  (vl_api_gre_tunnel_dump_t * mp, void *handle)
1660 {
1661  u8 *s;
1662 
1663  s = format (0, "SCRIPT: gre_tunnel_dump ");
1664 
1665  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1666 
1667  FINISH;
1668 }
1669 
1671  (vl_api_l2_fib_clear_table_t * mp, void *handle)
1672 {
1673  u8 *s;
1674 
1675  s = format (0, "SCRIPT: l2_fib_clear_table ");
1676 
1677  FINISH;
1678 }
1679 
1682 {
1683  u8 *s;
1684 
1685  s = format (0, "SCRIPT: l2_interface_efp_filter ");
1686 
1687  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1688  if (mp->enable_disable)
1689  s = format (s, "enable ");
1690  else
1691  s = format (s, "disable ");
1692 
1693  FINISH;
1694 }
1695 
1698 {
1699  u8 *s;
1700 
1701  s = format (0, "SCRIPT: l2_interface_vlan_tag_rewrite ");
1702 
1703  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1704  s = format (s, "vtr_op %d ", (mp->vtr_op));
1705  s = format (s, "push_dot1q %d ", (mp->push_dot1q));
1706  s = format (s, "tag1 %d ", (mp->tag1));
1707  s = format (s, "tag2 %d ", (mp->tag2));
1708 
1709  FINISH;
1710 }
1711 
1713  (vl_api_create_vhost_user_if_t * mp, void *handle)
1714 {
1715  u8 *s;
1716 
1717  s = format (0, "SCRIPT: create_vhost_user_if ");
1718 
1719  s = format (s, "socket %s ", mp->sock_filename);
1720  if (mp->is_server)
1721  s = format (s, "server ");
1722  if (mp->renumber)
1723  s = format (s, "renumber %d ", (mp->custom_dev_instance));
1724  if (mp->disable_mrg_rxbuf)
1725  s = format (s, "disable_mrg_rxbuf ");
1726  if (mp->disable_indirect_desc)
1727  s = format (s, "disable_indirect_desc ");
1728  if (mp->tag[0])
1729  s = format (s, "tag %s", mp->tag);
1730  if (mp->enable_gso)
1731  s = format (s, "gso");
1732 
1733  FINISH;
1734 }
1735 
1737  (vl_api_modify_vhost_user_if_t * mp, void *handle)
1738 {
1739  u8 *s;
1740 
1741  s = format (0, "SCRIPT: modify_vhost_user_if ");
1742 
1743  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1744  s = format (s, "socket %s ", mp->sock_filename);
1745  if (mp->is_server)
1746  s = format (s, "server ");
1747  if (mp->renumber)
1748  s = format (s, "renumber %d ", (mp->custom_dev_instance));
1749  if (mp->enable_gso)
1750  s = format (s, "gso");
1751 
1752  FINISH;
1753 }
1754 
1756  (vl_api_delete_vhost_user_if_t * mp, void *handle)
1757 {
1758  u8 *s;
1759 
1760  s = format (0, "SCRIPT: delete_vhost_user_if ");
1761  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1762 
1763  FINISH;
1764 }
1765 
1768 {
1769  u8 *s;
1770 
1771  s = format (0, "SCRIPT: sw_interface_vhost_user_dump ");
1772 
1773  FINISH;
1774 }
1775 
1777  (vl_api_sw_interface_dump_t * mp, void *handle)
1778 {
1779  u8 *s;
1780 
1781  s = format (0, "SCRIPT: sw_interface_dump ");
1782 
1783  if (mp->name_filter_valid)
1784  {
1786  s = format (s, "name_filter %v ", v);
1787  vec_free (v);
1788  }
1789  else
1790  s = format (s, "all ");
1791 
1792  FINISH;
1793 }
1794 
1796  (vl_api_l2_fib_table_dump_t * mp, void *handle)
1797 {
1798  u8 *s;
1799 
1800  s = format (0, "SCRIPT: l2_fib_table_dump ");
1801 
1802  s = format (s, "bd_id %d ", (mp->bd_id));
1803 
1804  FINISH;
1805 }
1806 
1807 static void *vl_api_control_ping_t_print
1808  (vl_api_control_ping_t * mp, void *handle)
1809 {
1810  u8 *s;
1811 
1812  s = format (0, "SCRIPT: control_ping ");
1813 
1814  FINISH;
1815 }
1816 
1818  (vl_api_want_interface_events_t * mp, void *handle)
1819 {
1820  u8 *s;
1821 
1822  s = format (0, "SCRIPT: want_interface_events pid %d enable %d ",
1823  (mp->pid), ntohl (mp->enable_disable));
1824 
1825  FINISH;
1826 }
1827 
1828 static void *
1829 vl_api_cli_t_print (vl_api_cli_t * mp, void *handle)
1830 {
1831  u8 *s;
1832 
1833  s = format (0, "SCRIPT: cli ");
1834 
1835  FINISH;
1836 }
1837 
1838 static void *vl_api_cli_inband_t_print
1839  (vl_api_cli_inband_t * mp, void *handle)
1840 {
1841  u8 *s;
1842  u8 *cmd = 0;
1843  u32 length = vl_api_string_len (&mp->cmd);
1844 
1845  vec_validate (cmd, length);
1846  clib_memcpy (cmd, vl_api_from_api_string (&mp->cmd), length);
1847 
1848  s = format (0, "SCRIPT: exec %v ", cmd);
1849 
1850  vec_free (cmd);
1851  FINISH;
1852 }
1853 
1854 static void *vl_api_memclnt_create_t_print
1855  (vl_api_memclnt_create_t * mp, void *handle)
1856 {
1857  u8 *s;
1858 
1859  s = format (0, "SCRIPT: memclnt_create name %s ", mp->name);
1860 
1861  FINISH;
1862 }
1863 
1864 static void *vl_api_sockclnt_create_t_print
1865  (vl_api_sockclnt_create_t * mp, void *handle)
1866 {
1867  u8 *s;
1868 
1869  s = format (0, "SCRIPT: sockclnt_create name %s ", mp->name);
1870 
1871  FINISH;
1872 }
1873 
1874 static void *vl_api_show_version_t_print
1875  (vl_api_show_version_t * mp, void *handle)
1876 {
1877  u8 *s;
1878 
1879  s = format (0, "SCRIPT: show_version ");
1880 
1881  FINISH;
1882 }
1883 
1884 __clib_unused
1885  static void *vl_api_show_threads_t_print
1886  (vl_api_show_threads_t * mp, void *handle)
1887 {
1888  u8 *s;
1889 
1890  s = format (0, "SCRIPT: show_threads ");
1891 
1892  FINISH;
1893 }
1894 
1897 {
1898  u8 *s;
1899 
1900  s = format (0, "SCRIPT: vxlan_gpe_add_del_tunnel ");
1901 
1902  ip46_address_t local = to_ip46 (mp->is_ipv6, mp->local);
1903  ip46_address_t remote = to_ip46 (mp->is_ipv6, mp->remote);
1904 
1905  u8 is_grp = ip46_address_is_multicast (&remote);
1906  char *remote_name = is_grp ? "group" : "remote";
1907 
1908  s = format (s, "local %U ", format_ip46_address, &local, IP46_TYPE_ANY);
1909  s = format (s, "%s %U ", remote_name, format_ip46_address,
1910  &remote, IP46_TYPE_ANY);
1911 
1912  if (is_grp)
1913  s = format (s, "mcast_sw_if_index %d ", (mp->mcast_sw_if_index));
1914  s = format (s, "protocol %d ", (mp->protocol));
1915 
1916  s = format (s, "vni %d ", (mp->vni));
1917 
1918  if (mp->is_add == 0)
1919  s = format (s, "del ");
1920 
1921  if (mp->encap_vrf_id)
1922  s = format (s, "encap-vrf-id %d ", (mp->encap_vrf_id));
1923 
1924  if (mp->decap_vrf_id)
1925  s = format (s, "decap-vrf-id %d ", (mp->decap_vrf_id));
1926 
1927  FINISH;
1928 }
1929 
1931  (vl_api_vxlan_gpe_tunnel_dump_t * mp, void *handle)
1932 {
1933  u8 *s;
1934 
1935  s = format (0, "SCRIPT: vxlan_gpe_tunnel_dump ");
1936 
1937  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1938 
1939  FINISH;
1940 }
1941 
1944 {
1945  u8 *s;
1946 
1947  s = format (0, "SCRIPT: interface_renumber ");
1948 
1949  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1950 
1951  s = format (s, "new_show_dev_instance %d ", (mp->new_show_dev_instance));
1952 
1953  FINISH;
1954 }
1955 
1957  (vl_api_want_l2_macs_events_t * mp, void *handle)
1958 {
1959  u8 *s;
1960 
1961  s = format (0, "SCRIPT: want_l2_macs_events ");
1962  s = format (s, "learn-limit %d ", (mp->learn_limit));
1963  s = format (s, "scan-delay %d ", (u32) mp->scan_delay);
1964  s = format (s, "max-entries %d ", (u32) mp->max_macs_in_event * 10);
1965  if (mp->enable_disable == 0)
1966  s = format (s, "disable");
1967 
1968  FINISH;
1969 }
1970 
1973 {
1974  u8 *s;
1975 
1976  s = format (0, "SCRIPT: input_acl_set_interface ");
1977 
1978  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1979  s = format (s, "ip4-table %d ", (mp->ip4_table_index));
1980  s = format (s, "ip6-table %d ", (mp->ip6_table_index));
1981  s = format (s, "l2-table %d ", (mp->l2_table_index));
1982 
1983  if (mp->is_add == 0)
1984  s = format (s, "del ");
1985 
1986  FINISH;
1987 }
1988 
1991 {
1992  u8 *s;
1993 
1994  s = format (0, "SCRIPT: output_acl_set_interface ");
1995 
1996  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1997  s = format (s, "ip4-table %d ", (mp->ip4_table_index));
1998  s = format (s, "ip6-table %d ", (mp->ip6_table_index));
1999  s = format (s, "l2-table %d ", (mp->l2_table_index));
2000 
2001  if (mp->is_add == 0)
2002  s = format (s, "del ");
2003 
2004  FINISH;
2005 }
2006 
2007 static void *vl_api_ip_address_dump_t_print
2008  (vl_api_ip_address_dump_t * mp, void *handle)
2009 {
2010  u8 *s;
2011 
2012  s = format (0, "SCRIPT: ip6_address_dump ");
2013  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2014  s = format (s, "is_ipv6 %d ", mp->is_ipv6 != 0);
2015 
2016  FINISH;
2017 }
2018 
2019 static void *
2021 {
2022  u8 *s;
2023 
2024  s = format (0, "SCRIPT: ip_dump ");
2025  s = format (s, "is_ipv6 %d ", mp->is_ipv6 != 0);
2026 
2027  FINISH;
2028 }
2029 
2032 {
2033  u8 *s;
2034 
2035  s = format (0, "SCRIPT: cop_interface_enable_disable ");
2036  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2037  if (mp->enable_disable)
2038  s = format (s, "enable ");
2039  else
2040  s = format (s, "disable ");
2041 
2042  FINISH;
2043 }
2044 
2047 {
2048  u8 *s;
2049 
2050  s = format (0, "SCRIPT: cop_whitelist_enable_disable ");
2051  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2052  s = format (s, "fib-id %d ", (mp->fib_id));
2053  if (mp->ip4)
2054  s = format (s, "ip4 ");
2055  if (mp->ip6)
2056  s = format (s, "ip6 ");
2057  if (mp->default_cop)
2058  s = format (s, "default ");
2059 
2060  FINISH;
2061 }
2062 
2064  (vl_api_af_packet_create_t * mp, void *handle)
2065 {
2066  u8 *s;
2067 
2068  s = format (0, "SCRIPT: af_packet_create ");
2069  s = format (s, "host_if_name %s ", mp->host_if_name);
2070  if (mp->use_random_hw_addr)
2071  s = format (s, "hw_addr random ");
2072  else
2073  s = format (s, "hw_addr %U ", format_ethernet_address, mp->hw_addr);
2074 
2075  FINISH;
2076 }
2077 
2079  (vl_api_af_packet_delete_t * mp, void *handle)
2080 {
2081  u8 *s;
2082 
2083  s = format (0, "SCRIPT: af_packet_delete ");
2084  s = format (s, "host_if_name %s ", mp->host_if_name);
2085 
2086  FINISH;
2087 }
2088 
2089 static void *vl_api_af_packet_dump_t_print
2090  (vl_api_af_packet_dump_t * mp, void *handle)
2091 {
2092  u8 *s;
2093 
2094  s = format (0, "SCRIPT: af_packet_dump ");
2095 
2096  FINISH;
2097 }
2098 
2099 static u8 *
2100 format_policer_action (u8 * s, va_list * va)
2101 {
2102  u32 action = va_arg (*va, u32);
2103  u32 dscp = va_arg (*va, u32);
2104  char *t = 0;
2105 
2106  if (action == SSE2_QOS_ACTION_DROP)
2107  s = format (s, "drop");
2108  else if (action == SSE2_QOS_ACTION_TRANSMIT)
2109  s = format (s, "transmit");
2110  else if (action == SSE2_QOS_ACTION_MARK_AND_TRANSMIT)
2111  {
2112  s = format (s, "mark-and-transmit ");
2113  switch (dscp)
2114  {
2115 #define _(v,f,str) case VNET_DSCP_##f: t = str; break;
2117 #undef _
2118  default:
2119  break;
2120  }
2121  s = format (s, "%s", t);
2122  }
2123  return s;
2124 }
2125 
2126 static void *vl_api_policer_add_del_t_print
2127  (vl_api_policer_add_del_t * mp, void *handle)
2128 {
2129  u8 *s;
2130 
2131  s = format (0, "SCRIPT: policer_add_del ");
2132  s = format (s, "name %s ", mp->name);
2133  s = format (s, "cir %d ", mp->cir);
2134  s = format (s, "eir %d ", mp->eir);
2135  s = format (s, "cb %d ", mp->cb);
2136  s = format (s, "eb %d ", mp->eb);
2137 
2138  switch (mp->rate_type)
2139  {
2140  case SSE2_QOS_RATE_KBPS:
2141  s = format (s, "rate_type kbps ");
2142  break;
2143  case SSE2_QOS_RATE_PPS:
2144  s = format (s, "rate_type pps ");
2145  break;
2146  default:
2147  break;
2148  }
2149 
2150  switch (mp->round_type)
2151  {
2153  s = format (s, "round_type closest ");
2154  break;
2155  case SSE2_QOS_ROUND_TO_UP:
2156  s = format (s, "round_type up ");
2157  break;
2159  s = format (s, "round_type down ");
2160  break;
2161  default:
2162  break;
2163  }
2164 
2165  switch (mp->type)
2166  {
2168  s = format (s, "type 1r2c ");
2169  break;
2171  s = format (s, "type 1r3c ");
2172  break;
2174  s = format (s, "type 2r3c-2698 ");
2175  break;
2177  s = format (s, "type 2r3c-4115 ");
2178  break;
2180  s = format (s, "type 2r3c-mef5cf1 ");
2181  break;
2182  default:
2183  break;
2184  }
2185 
2186  s = format (s, "conform_action %U ", format_policer_action,
2188  s = format (s, "exceed_action %U ", format_policer_action,
2189  mp->exceed_action_type, mp->exceed_dscp);
2190  s = format (s, "violate_action %U ", format_policer_action,
2192 
2193  if (mp->color_aware)
2194  s = format (s, "color-aware ");
2195  if (mp->is_add == 0)
2196  s = format (s, "del ");
2197 
2198  FINISH;
2199 }
2200 
2201 static void *vl_api_policer_dump_t_print
2202  (vl_api_policer_dump_t * mp, void *handle)
2203 {
2204  u8 *s;
2205 
2206  s = format (0, "SCRIPT: policer_dump ");
2207  if (mp->match_name_valid)
2208  s = format (s, "name %s ", mp->match_name);
2209 
2210  FINISH;
2211 }
2212 
2215 {
2216  u8 *s;
2217 
2218  s = format (0, "SCRIPT: policer_classify_set_interface ");
2219  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2220  if (mp->ip4_table_index != ~0)
2221  s = format (s, "ip4-table %d ", (mp->ip4_table_index));
2222  if (mp->ip6_table_index != ~0)
2223  s = format (s, "ip6-table %d ", (mp->ip6_table_index));
2224  if (mp->l2_table_index != ~0)
2225  s = format (s, "l2-table %d ", (mp->l2_table_index));
2226  if (mp->is_add == 0)
2227  s = format (s, "del ");
2228 
2229  FINISH;
2230 }
2231 
2233  (vl_api_policer_classify_dump_t * mp, void *handle)
2234 {
2235  u8 *s;
2236 
2237  s = format (0, "SCRIPT: policer_classify_dump ");
2238  switch (mp->type)
2239  {
2241  s = format (s, "type ip4 ");
2242  break;
2244  s = format (s, "type ip6 ");
2245  break;
2247  s = format (s, "type l2 ");
2248  break;
2249  default:
2250  break;
2251  }
2252 
2253  FINISH;
2254 }
2255 
2258 {
2259  u8 *s;
2260 
2261  s = format (0, "SCRIPT: sw_interface_clear_stats ");
2262  if (mp->sw_if_index != ~0)
2263  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2264 
2265  FINISH;
2266 }
2267 
2269  (vl_api_mpls_tunnel_dump_t * mp, void *handle)
2270 {
2271  u8 *s;
2272 
2273  s = format (0, "SCRIPT: mpls_tunnel_dump ");
2274  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2275 
2276  FINISH;
2277 }
2278 
2279 static void *vl_api_mpls_table_dump_t_print
2280  (vl_api_mpls_table_dump_t * mp, void *handle)
2281 {
2282  u8 *s;
2283 
2284  s = format (0, "SCRIPT: mpls_table_decap_dump ");
2285 
2286  FINISH;
2287 }
2288 
2289 static void *vl_api_mpls_route_dump_t_print
2290  (vl_api_mpls_route_dump_t * mp, void *handle)
2291 {
2292  u8 *s;
2293 
2294  s = format (0, "SCRIPT: mpls_route_decap_dump ");
2295 
2296  FINISH;
2297 }
2298 
2299 static void *vl_api_ip_table_dump_t_print
2300  (vl_api_ip_table_dump_t * mp, void *handle)
2301 {
2302  u8 *s;
2303 
2304  s = format (0, "SCRIPT: ip_table_dump ");
2305 
2306  FINISH;
2307 }
2308 
2309 static void *vl_api_ip_route_dump_t_print
2310  (vl_api_ip_route_dump_t * mp, void *handle)
2311 {
2312  u8 *s;
2313 
2314  s = format (0, "SCRIPT: ip_route_dump ");
2315 
2316  FINISH;
2317 }
2318 
2320  (vl_api_classify_table_ids_t * mp, void *handle)
2321 {
2322  u8 *s;
2323 
2324  s = format (0, "SCRIPT: classify_table_ids ");
2325 
2326  FINISH;
2327 }
2328 
2331 {
2332  u8 *s;
2333 
2334  s = format (0, "SCRIPT: classify_table_by_interface ");
2335  if (mp->sw_if_index != ~0)
2336  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2337 
2338  FINISH;
2339 }
2340 
2342  (vl_api_classify_table_info_t * mp, void *handle)
2343 {
2344  u8 *s;
2345 
2346  s = format (0, "SCRIPT: classify_table_info ");
2347  if (mp->table_id != ~0)
2348  s = format (s, "table_id %d ", (mp->table_id));
2349 
2350  FINISH;
2351 }
2352 
2354  (vl_api_classify_session_dump_t * mp, void *handle)
2355 {
2356  u8 *s;
2357 
2358  s = format (0, "SCRIPT: classify_session_dump ");
2359  if (mp->table_id != ~0)
2360  s = format (s, "table_id %d ", (mp->table_id));
2361 
2362  FINISH;
2363 }
2364 
2366  (vl_api_set_ipfix_exporter_t * mp, void *handle)
2367 {
2368  u8 *s;
2369 
2370  s = format (0, "SCRIPT: set_ipfix_exporter ");
2371 
2372  s = format (s, "collector-address %U ", format_ip4_address,
2373  (ip4_address_t *) mp->collector_address.un.ip4);
2374  s = format (s, "collector-port %d ", (mp->collector_port));
2375  s = format (s, "src-address %U ", format_ip4_address,
2376  (ip4_address_t *) mp->src_address.un.ip4);
2377  s = format (s, "vrf-id %d ", (mp->vrf_id));
2378  s = format (s, "path-mtu %d ", (mp->path_mtu));
2379  s = format (s, "template-interval %d ", (mp->template_interval));
2380  s = format (s, "udp-checksum %d ", mp->udp_checksum);
2381 
2382  FINISH;
2383 }
2384 
2386  (vl_api_ipfix_exporter_dump_t * mp, void *handle)
2387 {
2388  u8 *s;
2389 
2390  s = format (0, "SCRIPT: ipfix_exporter_dump ");
2391 
2392  FINISH;
2393 }
2394 
2397 {
2398  u8 *s;
2399 
2400  s = format (0, "SCRIPT: set_ipfix_classify_stream ");
2401 
2402  s = format (s, "domain-id %d ", (mp->domain_id));
2403  s = format (s, "src-port %d ", (mp->src_port));
2404 
2405  FINISH;
2406 }
2407 
2410 {
2411  u8 *s;
2412 
2413  s = format (0, "SCRIPT: ipfix_classify_stream_dump ");
2414 
2415  FINISH;
2416 }
2417 
2420 {
2421  u8 *s;
2422 
2423  s = format (0, "SCRIPT: ipfix_classify_table_add_del ");
2424 
2425  s = format (s, "table-id %d ", (mp->table_id));
2426  s = format (s, "ip-version %d ", mp->ip_version);
2427  s = format (s, "transport-protocol %d ", mp->transport_protocol);
2428 
2429  FINISH;
2430 }
2431 
2434 {
2435  u8 *s;
2436 
2437  s = format (0, "SCRIPT: ipfix_classify_table_dump ");
2438 
2439  FINISH;
2440 }
2441 
2444 {
2445  u8 *s;
2446 
2447  s = format (0, "SCRIPT: sw_interface_span_enable_disable ");
2448  s = format (s, "src_sw_if_index %u ", (mp->sw_if_index_from));
2449  s = format (s, "dst_sw_if_index %u ", (mp->sw_if_index_to));
2450 
2451  if (mp->is_l2)
2452  s = format (s, "l2 ");
2453 
2454  switch (mp->state)
2455  {
2456  case 0:
2457  s = format (s, "disable ");
2458  break;
2459  case 1:
2460  s = format (s, "rx ");
2461  break;
2462  case 2:
2463  s = format (s, "tx ");
2464  break;
2465  case 3:
2466  default:
2467  s = format (s, "both ");
2468  break;
2469  }
2470 
2471  FINISH;
2472 }
2473 
2474 static void *
2476  void *handle)
2477 {
2478  u8 *s;
2479 
2480  s = format (0, "SCRIPT: sw_interface_span_dump ");
2481 
2482  if (mp->is_l2)
2483  s = format (s, "l2 ");
2484 
2485  FINISH;
2486 }
2487 
2488 static void *vl_api_get_next_index_t_print
2489  (vl_api_get_next_index_t * mp, void *handle)
2490 {
2491  u8 *s;
2492 
2493  s = format (0, "SCRIPT: get_next_index ");
2494  s = format (s, "node-name %s ", mp->node_name);
2495  s = format (s, "next-node-name %s ", mp->next_name);
2496 
2497  FINISH;
2498 }
2499 
2501  (vl_api_pg_create_interface_t * mp, void *handle)
2502 {
2503  u8 *s;
2504 
2505  s = format (0, "SCRIPT: pg_create_interface ");
2506  s = format (0, "if_id %d", (mp->interface_id));
2507  s = format (0, "gso-enabled %u", mp->gso_enabled);
2508  s = format (0, "gso-size %u", (mp->gso_size));
2509 
2510  FINISH;
2511 }
2512 
2513 static void *vl_api_pg_capture_t_print
2514  (vl_api_pg_capture_t * mp, void *handle)
2515 {
2516  u8 *s;
2517 
2518  s = format (0, "SCRIPT: pg_capture ");
2519  s = format (0, "if_id %d ", (mp->interface_id));
2520  s = format (0, "pcap %s", mp->pcap_file_name);
2521  if (mp->count != ~0)
2522  s = format (s, "count %d ", (mp->count));
2523  if (!mp->is_enabled)
2524  s = format (s, "disable");
2525 
2526  FINISH;
2527 }
2528 
2530  (vl_api_pg_enable_disable_t * mp, void *handle)
2531 {
2532  u8 *s;
2533 
2534  s = format (0, "SCRIPT: pg_enable_disable ");
2535  if ((mp->stream_name_length) > 0)
2536  s = format (s, "stream %s", mp->stream_name);
2537  if (!mp->is_enabled)
2538  s = format (s, "disable");
2539 
2540  FINISH;
2541 }
2542 
2545 {
2546  u8 *s;
2547  int i;
2548 
2549  s = format (0, "SCRIPT: ip_source_and_port_range_check_add_del ");
2550  s = format (s, "%U ", format_vl_api_prefix, &mp->prefix);
2551 
2552  for (i = 0; i < mp->number_of_ranges; i++)
2553  {
2554  s = format (s, "range %d - %d ", mp->low_ports[i], mp->high_ports[i]);
2555  }
2556 
2557  s = format (s, "vrf %d ", (mp->vrf_id));
2558 
2559  if (mp->is_add == 0)
2560  s = format (s, "del ");
2561 
2562  FINISH;
2563 }
2564 
2567  void *handle)
2568 {
2569  u8 *s;
2570 
2571  s = format (0, "SCRIPT: ip_source_and_port_range_check_interface_add_del ");
2572 
2573  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2574 
2575  if (mp->tcp_out_vrf_id != ~0)
2576  s = format (s, "tcp-out-vrf %d ", (mp->tcp_out_vrf_id));
2577 
2578  if (mp->udp_out_vrf_id != ~0)
2579  s = format (s, "udp-out-vrf %d ", (mp->udp_out_vrf_id));
2580 
2581  if (mp->tcp_in_vrf_id != ~0)
2582  s = format (s, "tcp-in-vrf %d ", (mp->tcp_in_vrf_id));
2583 
2584  if (mp->udp_in_vrf_id != ~0)
2585  s = format (s, "udp-in-vrf %d ", (mp->udp_in_vrf_id));
2586 
2587  if (mp->is_add == 0)
2588  s = format (s, "del ");
2589 
2590  FINISH;
2591 }
2592 
2594  (vl_api_lisp_enable_disable_t * mp, void *handle)
2595 {
2596  u8 *s;
2597 
2598  s = format (0, "SCRIPT: lisp_enable_disable %s",
2599  mp->is_en ? "enable" : "disable");
2600 
2601  FINISH;
2602 }
2603 
2605  (vl_api_gpe_add_del_iface_t * mp, void *handle)
2606 {
2607  u8 *s;
2608 
2609  s = format (0, "SCRIPT: gpe_add_del_iface ");
2610 
2611  s = format (s, "%s ", mp->is_add ? "up" : "down");
2612  s = format (s, "vni %d ", mp->vni);
2613  s = format (s, "%s %d ", mp->is_l2 ? "bd_id" : "table_id", mp->dp_table);
2614 
2615  FINISH;
2616 }
2617 
2620 {
2621  u8 *s;
2622 
2623  s = format (0, "SCRIPT: lisp_pitr_set_locator_set ");
2624 
2625  if (mp->is_add)
2626  s = format (s, "locator-set %s ", mp->ls_name);
2627  else
2628  s = format (s, "del");
2629 
2630  FINISH;
2631 }
2632 
2633 static u8 *
2634 format_lisp_flat_eid (u8 * s, va_list * args)
2635 {
2636  u32 type = va_arg (*args, u32);
2637  u8 *eid = va_arg (*args, u8 *);
2638  u32 eid_len = va_arg (*args, u32);
2639 
2640  switch (type)
2641  {
2642  case 0:
2643  return format (s, "%U/%d", format_ip4_address, eid, eid_len);
2644  case 1:
2645  return format (s, "%U/%d", format_ip6_address, eid, eid_len);
2646  case 3:
2647  return format (s, "%U", format_ethernet_address, eid);
2648  }
2649  return 0;
2650 }
2651 
2654 {
2655  u8 *s;
2656  u32 rloc_num = 0;
2657 
2658  s = format (0, "SCRIPT: lisp_add_del_remote_mapping ");
2659 
2660  if (mp->del_all)
2661  s = format (s, "del-all ");
2662 
2663  s = format (s, "%s ", mp->is_add ? "add" : "del");
2664  s = format (s, "vni %d ", (mp->vni));
2665 
2666  s = format (s, "eid %U ", format_lisp_flat_eid,
2667  mp->eid_type, mp->eid, mp->eid_len);
2668 
2669  if (mp->is_src_dst)
2670  {
2671  s = format (s, "seid %U ", format_lisp_flat_eid,
2672  mp->eid_type, mp->seid, mp->seid_len);
2673  }
2674  rloc_num = (mp->rloc_num);
2675 
2676  if (0 == rloc_num)
2677  s = format (s, "action %d", mp->action);
2678 
2679  FINISH;
2680 }
2681 
2683  (vl_api_lisp_add_del_adjacency_t * mp, void *handle)
2684 {
2685  u8 *s;
2686 
2687  s = format (0, "SCRIPT: lisp_add_del_adjacency ");
2688 
2689  s = format (s, "%s ", mp->is_add ? "add" : "del");
2690  s = format (s, "vni %d ", (mp->vni));
2691  s = format (s, "reid %U leid %U ",
2692  format_lisp_flat_eid, mp->eid_type, mp->reid, mp->reid_len,
2693  format_lisp_flat_eid, mp->eid_type, mp->leid, mp->leid_len);
2694 
2695  FINISH;
2696 }
2697 
2700 {
2701  u8 *s;
2702 
2703  s = format (0, "SCRIPT: lisp_add_del_map_request_itr_rlocs ");
2704 
2705  if (mp->is_add)
2706  s = format (s, "%s", mp->locator_set_name);
2707  else
2708  s = format (s, "del");
2709 
2710  FINISH;
2711 }
2712 
2715 {
2716  u8 *s;
2717 
2718  s = format (0, "SCRIPT: lisp_eid_table_add_del_map ");
2719 
2720  if (!mp->is_add)
2721  s = format (s, "del ");
2722 
2723  s = format (s, "vni %d ", (mp->vni));
2724  s = format (s, "%s %d ", mp->is_l2 ? "bd_index" : "vrf", (mp->dp_table));
2725  FINISH;
2726 }
2727 
2729  (vl_api_lisp_add_del_local_eid_t * mp, void *handle)
2730 {
2731  u8 *s;
2732 
2733  s = format (0, "SCRIPT: lisp_add_del_local_eid ");
2734 
2735  if (!mp->is_add)
2736  s = format (s, "del ");
2737 
2738  s = format (s, "vni %d ", (mp->vni));
2739  s = format (s, "eid %U ", format_lisp_flat_eid, mp->eid_type, mp->eid,
2740  mp->prefix_len);
2741  s = format (s, "locator-set %s ", mp->locator_set_name);
2742  if (*mp->key)
2743  {
2744  u32 key_id = mp->key_id;
2745  s = format (s, "key-id %U", format_hmac_key_id, key_id);
2746  s = format (s, "secret-key %s", mp->key);
2747  }
2748  FINISH;
2749 }
2750 
2752  (vl_api_gpe_add_del_fwd_entry_t * mp, void *handle)
2753 {
2754  u8 *s;
2755 
2756  s = format (0, "SCRIPT: gpe_add_del_fwd_entry TODO");
2757 
2758  FINISH;
2759 }
2760 
2763 {
2764  u8 *s;
2765 
2766  s = format (0, "SCRIPT: lisp_add_del_map_resolver ");
2767 
2768  if (!mp->is_add)
2769  s = format (s, "del ");
2770 
2771  if (mp->is_ipv6)
2772  s = format (s, "%U ", format_ip6_address, mp->ip_address);
2773  else
2774  s = format (s, "%U ", format_ip4_address, mp->ip_address);
2775 
2776  FINISH;
2777 }
2778 
2780  (vl_api_gpe_enable_disable_t * mp, void *handle)
2781 {
2782  u8 *s;
2783 
2784  s = format (0, "SCRIPT: gpe_enable_disable ");
2785 
2786  s = format (s, "%s ", mp->is_en ? "enable" : "disable");
2787 
2788  FINISH;
2789 }
2790 
2793 {
2794  u8 *s;
2795 
2796  s = format (0, "SCRIPT: lisp_add_del_locator_set ");
2797 
2798  if (!mp->is_add)
2799  s = format (s, "del ");
2800 
2801  s = format (s, "locator-set %s ", mp->locator_set_name);
2802 
2803  FINISH;
2804 }
2805 
2807  (vl_api_lisp_add_del_locator_t * mp, void *handle)
2808 {
2809  u8 *s;
2810 
2811  s = format (0, "SCRIPT: lisp_add_del_locator ");
2812 
2813  if (!mp->is_add)
2814  s = format (s, "del ");
2815 
2816  s = format (s, "locator-set %s ", mp->locator_set_name);
2817  s = format (s, "sw_if_index %d ", mp->sw_if_index);
2818  s = format (s, "p %d w %d ", mp->priority, mp->weight);
2819 
2820  FINISH;
2821 }
2822 
2824  (vl_api_lisp_locator_set_dump_t * mp, void *handle)
2825 {
2826  u8 *s;
2827 
2828  s = format (0, "SCRIPT: lisp_locator_set_dump ");
2829  if (mp->filter == 1)
2830  s = format (s, "local");
2831  else if (mp->filter == 2)
2832  s = format (s, "remote");
2833 
2834  FINISH;
2835 }
2836 
2838  (vl_api_lisp_locator_dump_t * mp, void *handle)
2839 {
2840  u8 *s;
2841 
2842  s = format (0, "SCRIPT: lisp_locator_dump ");
2843  if (mp->is_index_set)
2844  s = format (s, "ls_index %d", (mp->ls_index));
2845  else
2846  s = format (s, "ls_name %s", mp->ls_name);
2847 
2848  FINISH;
2849 }
2850 
2852  (vl_api_lisp_map_request_mode_t * mp, void *handle)
2853 {
2854  u8 *s;
2855 
2856  s = format (0, "SCRIPT: lisp_map_request_mode ");
2857 
2858  switch (mp->mode)
2859  {
2860  case 0:
2861  s = format (s, "dst-only");
2862  break;
2863  case 1:
2864  s = format (s, "src-dst");
2865  default:
2866  break;
2867  }
2868 
2869  FINISH;
2870 }
2871 
2873  (vl_api_lisp_eid_table_dump_t * mp, void *handle)
2874 {
2875  u8 *s;
2876 
2877  s = format (0, "SCRIPT: lisp_eid_table_dump ");
2878 
2879  if (mp->eid_set)
2880  {
2881  s = format (s, "vni %d ", (mp->vni));
2882  s = format (s, "eid %U ", format_lisp_flat_eid, mp->eid_type,
2883  mp->eid, mp->prefix_length);
2884  switch (mp->filter)
2885  {
2886  case 1:
2887  s = format (s, "local ");
2888  break;
2889  case 2:
2890  s = format (s, "remote ");
2891  break;
2892  }
2893  }
2894  FINISH;
2895 }
2896 
2899 {
2900  u8 *s;
2901 
2902  s = format (0, "SCRIPT: lisp_rloc_probe_enable_disable ");
2903  if (mp->is_enabled)
2904  s = format (s, "enable");
2905  else
2906  s = format (s, "disable");
2907 
2908  FINISH;
2909 }
2910 
2913 {
2914  u8 *s;
2915 
2916  s = format (0, "SCRIPT: lisp_map_register_enable_disable ");
2917  if (mp->is_enabled)
2918  s = format (s, "enable");
2919  else
2920  s = format (s, "disable");
2921 
2922  FINISH;
2923 }
2924 
2926  (vl_api_lisp_adjacencies_get_t * mp, void *handle)
2927 {
2928  u8 *s;
2929 
2930  s = format (0, "SCRIPT: lisp_adjacencies_get ");
2931  s = format (s, "vni %d", (mp->vni));
2932 
2933  FINISH;
2934 }
2935 
2938 {
2939  u8 *s;
2940 
2941  s = format (0, "SCRIPT: lisp_eid_table_map_dump ");
2942 
2943  if (mp->is_l2)
2944  s = format (s, "l2");
2945  else
2946  s = format (s, "l3");
2947 
2948  FINISH;
2949 }
2950 
2953 {
2954  u8 *s;
2955 
2956  s = format (0, "SCRIPT: ipsec_tunnel_if_add_del ");
2957 
2958  if (mp->esn)
2959  s = format (s, "esn");
2960  if (mp->anti_replay)
2961  s = format (s, "anti-replay");
2962  if (mp->udp_encap)
2963  s = format (s, "udp-encap");
2964 
2965  s = format (s, "local-ip %U ", format_vl_api_address, &mp->remote_ip);
2966 
2967  s = format (s, "remote-ip %U ", format_vl_api_address, &mp->local_ip);
2968  s = format (s, "tx-table-id %d ", (mp->tx_table_id));
2969 
2970  s = format (s, "local-spi %d ", (mp->local_spi));
2971 
2972  s = format (s, "remote-spi %d ", (mp->remote_spi));
2973 
2974  s = format (s, "local-crypto-key-len %d ", mp->local_crypto_key_len);
2975  s = format (s, "local-crypto-key %U ", format_hex_bytes,
2977  s = format (s, "remote-crypto-key-len %d ", mp->remote_crypto_key_len);
2978  s = format (s, "remote-crypto-key %U ", format_hex_bytes,
2980  s = format (s, "local-integ-key-len %d ", mp->local_integ_key_len);
2981  s = format (s, "local-integ-key %U ", format_hex_bytes,
2982  mp->local_integ_key, mp->local_integ_key_len, 0);
2983  s = format (s, "remote-integ-key-len %d ", mp->remote_integ_key_len);
2984  s = format (s, "remote-integ-key %U ", format_hex_bytes,
2986 
2987  if (mp->is_add == 0)
2988  s = format (s, "del ");
2989 
2990  FINISH;
2991 }
2992 
2993 static const char *policy_strs[] = {
2994  "BYPASS",
2995  "DISCARD",
2996  "RESOLVE",
2997  "PROTECT",
2998 };
2999 
3000 static const char *proto_strs[] = {
3001  "ESP",
3002  "AH",
3003 };
3004 
3005 static const char *algo_strs[] = {
3006  "NONE",
3007  "AES_CBC_128",
3008  "AES_CBC_192",
3009  "AES_CBC_256",
3010  "AES_CTR_128",
3011  "AES_CTR_192",
3012  "AES_CTR_256",
3013  "AES_GCM_128",
3014  "AES_GCM_192",
3015  "AES_GCM_256",
3016  "DES_CBC",
3017  "3DES_CBC",
3018 };
3019 
3020 
3021 static const char *integ_strs[] = {
3022  "NONE",
3023  "MD5_96",
3024  "SHA1_96",
3025  "SHA_256_96",
3026  "SHA_256_128",
3027  "SHA_384_192",
3028  "SHA_512_256",
3029 };
3030 
3033 {
3034  u8 *s;
3035  const char *str;
3036  vl_api_ipsec_spd_entry_t *ep;
3037  int policy_host_byte_order;
3038 
3039  ep = (vl_api_ipsec_spd_entry_t *) & mp->entry;
3040 
3041  s = format (0, "SCRIPT: ipsec_spd_entry ");
3042  s = format (s, "is_add %d spd_id %u priority %d is_outbound %d sa_id %u\n",
3043  mp->is_add,
3044  (ep->spd_id), ntohl (ep->priority), ep->is_outbound,
3045  (ep->sa_id));
3046 
3047  policy_host_byte_order = (ep->policy);
3048 
3049  if (policy_host_byte_order < ARRAY_LEN (policy_strs))
3050  str = policy_strs[policy_host_byte_order];
3051  else
3052  str = "BOGUS!";
3053 
3054  s = format (s, " policy: %s protocol %d\n", str, ep->protocol);
3055 
3056  s = format (s, " remote_address_start %U remote_address_stop %U\n",
3058  &ep->remote_address_start,
3059  format_vl_api_address, &ep->remote_address_stop);
3060 
3061  s = format (s, " local_address_start %U local_address_stop %U\n",
3063  &ep->local_address_start,
3064  format_vl_api_address, &ep->local_address_stop);
3065 
3066  s = format (s, " remote_port_start %d remote_port_stop %d\n",
3067  (ep->remote_port_start), ntohs (ep->remote_port_stop));
3068 
3069  s = format (s, " local_port_start %d local_port_stop %d ",
3070  (ep->local_port_start), ntohs (ep->local_port_stop));
3071 
3072  FINISH;
3073 }
3074 
3077 {
3078  u8 *s;
3079 
3080  s = format (0, "SCRIPT: ipsec_interface_add_del_spd ");
3081  s = format (s, "is_add %d sw_if_index %d spd_id %u ",
3082  mp->is_add, (mp->sw_if_index), ntohl (mp->spd_id));
3083  FINISH;
3084 }
3085 
3087  (vl_api_ipsec_spd_add_del_t * mp, void *handle)
3088 {
3089  u8 *s;
3090 
3091  s = format (0, "SCRIPT: ipsec_spd_add_del ");
3092  s = format (s, "spd_id %u is_add %d ", (mp->spd_id), mp->is_add);
3093  FINISH;
3094 }
3095 
3098 {
3099  u8 *s;
3100  int tmp;
3101  vl_api_ipsec_sad_entry_t *ep;
3102  const char *protocol_str, *algo_str, *integ_str;
3103 
3104  protocol_str = "BOGUS protocol!";
3105  algo_str = "BOGUS crypto_algorithm!";
3106  integ_str = "BOGUS integrity_algorithm!";
3107 
3108  ep = (vl_api_ipsec_sad_entry_t *) & mp->entry;
3109 
3110  s = format (0, "SCRIPT: ipsec_sad_entry_add_del is_add ", mp->is_add);
3111 
3112  tmp = (ep->protocol);
3113  if (tmp < ARRAY_LEN (proto_strs))
3114  protocol_str = proto_strs[tmp];
3115 
3116  tmp = (ep->crypto_algorithm);
3117  if (tmp < ARRAY_LEN (algo_strs))
3118  algo_str = algo_strs[tmp];
3119 
3120  tmp = (ep->integrity_algorithm);
3121  if (tmp < ARRAY_LEN (integ_strs))
3122  integ_str = integ_strs[tmp];
3123 
3124  s = format (s, "proto %s crypto alg %s integ alg %s\n",
3125  protocol_str, algo_str, integ_str);
3126  s = format (s, " crypto_key len %d value %U\n",
3127  ep->crypto_key.length, format_hex_bytes, ep->crypto_key.data,
3128  (int) (ep->crypto_key.length));
3129  s = format (s, " integ_key len %d value %U\n",
3130  ep->integrity_key.length, format_hex_bytes,
3131  ep->integrity_key.data, (int) (ep->integrity_key.length));
3132  s = format (s, " flags 0x%x ", (ep->flags));
3133 
3134  s = format (s, "tunnel_src %U tunnel_dst %U\n",
3136  &ep->tunnel_src, format_vl_api_address, &ep->tunnel_dst);
3137  s = format (s, " tx_table_id %u salt %u ",
3138  (ep->tx_table_id), ntohl (ep->salt));
3139  FINISH;
3140 }
3141 
3142 
3145 {
3146  u8 *s;
3147  u32 vtr_op = (mp->vtr_op);
3148 
3149  s = format (0, "SCRIPT: l2_interface_pbb_tag_rewrite ");
3150 
3151  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
3152  s = format (s, "vtr_op %d ", vtr_op);
3153  if (vtr_op != L2_VTR_DISABLED && vtr_op != L2_VTR_POP_2)
3154  {
3155  if (vtr_op == L2_VTR_TRANSLATE_2_2)
3156  s = format (s, "%d ", (mp->outer_tag));
3157  s = format (s, "dmac %U ", format_ethernet_address, &mp->b_dmac);
3158  s = format (s, "smac %U ", format_ethernet_address, &mp->b_smac);
3159  s = format (s, "sid %d ", (mp->i_sid));
3160  s = format (s, "vlanid %d ", (mp->b_vlanid));
3161  }
3162  FINISH;
3163 }
3164 
3167 {
3168  u8 *s;
3169 
3170  s = format (0, "SCRIPT: flow_classify_set_interface ");
3171  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
3172  if (mp->ip4_table_index != ~0)
3173  s = format (s, "ip4-table %d ", (mp->ip4_table_index));
3174  if (mp->ip6_table_index != ~0)
3175  s = format (s, "ip6-table %d ", (mp->ip6_table_index));
3176  if (mp->is_add == 0)
3177  s = format (s, "del ");
3178 
3179  FINISH;
3180 }
3181 
3182 static void *
3184 {
3185  u8 *s;
3186 
3187  s = format (0, "SCRIPT: punt ");
3188 
3189  switch (mp->punt.type)
3190  {
3191  case PUNT_API_TYPE_L4:
3192  s = format (s, "%U", format_vl_api_address_family, mp->punt.punt.l4.af);
3193 
3194  s = format (s, "protocol %d ", mp->punt.punt.l4.protocol);
3195 
3196  if (mp->punt.punt.l4.port != (u16) ~ 0)
3197  s = format (s, "port %d ", (mp->punt.punt.l4.port));
3198  break;
3199  default:
3200  break;
3201 
3202  }
3203 
3204  if (!mp->is_add)
3205  s = format (s, "del ");
3206 
3207  FINISH;
3208 }
3209 
3211  (vl_api_flow_classify_dump_t * mp, void *handle)
3212 {
3213  u8 *s;
3214 
3215  s = format (0, "SCRIPT: flow_classify_dump ");
3216  switch (mp->type)
3217  {
3219  s = format (s, "type ip4 ");
3220  break;
3222  s = format (s, "type ip6 ");
3223  break;
3224  default:
3225  break;
3226  }
3227 
3228  FINISH;
3229 }
3230 
3232  (vl_api_get_first_msg_id_t * mp, void *handle)
3233 {
3234  u8 *s;
3235 
3236  s = format (0, "SCRIPT: get_first_msg_id %s ", mp->name);
3237 
3238  FINISH;
3239 }
3240 
3241 static void *vl_api_ioam_enable_t_print
3242  (vl_api_ioam_enable_t * mp, void *handle)
3243 {
3244  u8 *s;
3245 
3246  s = format (0, "SCRIPT: ioam_enable ");
3247 
3248  if (mp->trace_enable)
3249  s = format (s, "trace enabled");
3250 
3251  if (mp->pot_enable)
3252  s = format (s, "POT enabled");
3253 
3254  if (mp->seqno)
3255  s = format (s, "Seqno enabled");
3256 
3257  if (mp->analyse)
3258  s = format (s, "Analyse enabled");
3259 
3260  FINISH;
3261 }
3262 
3263 static void *vl_api_ioam_disable_t_print
3264  (vl_api_ioam_disable_t * mp, void *handle)
3265 {
3266  u8 *s;
3267 
3268  s = format (0, "SCRIPT: ioam_disable ");
3269  s = format (s, "trace disabled");
3270  s = format (s, "POT disabled");
3271  s = format (s, "Seqno disabled");
3272  s = format (s, "Analyse disabled");
3273 
3274  FINISH;
3275 }
3276 
3278  (vl_api_feature_enable_disable_t * mp, void *handle)
3279 {
3280  u8 *s;
3281 
3282  s = format (0, "SCRIPT: feature_enable_disable ");
3283  s = format (s, "arc_name %s ", mp->arc_name);
3284  s = format (s, "feature_name %s ", mp->feature_name);
3285  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
3286  if (!mp->enable)
3287  s = format (s, "disable");
3288 
3289  FINISH;
3290 }
3291 
3294 {
3295  u8 *s;
3296 
3297  s = format (0, "SCRIPT: feature_gso_enable_disable ");
3298  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
3299  if (mp->enable_disable)
3300  s = format (s, "enable");
3301  if (!mp->enable_disable)
3302  s = format (s, "disable");
3303 
3304  FINISH;
3305 }
3306 
3309 {
3310  u8 *s;
3311 
3312  s = format (0, "SCRIPT: sw_interface_tag_add_del ");
3313  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
3314  if (mp->is_add)
3315  s = format (s, "tag %s ", mp->tag);
3316  else
3317  s = format (s, "del ");
3318 
3319  FINISH;
3320 }
3321 
3323  (vl_api_hw_interface_set_mtu_t * mp, void *handle)
3324 {
3325  u8 *s;
3326 
3327  s = format (0, "SCRIPT: sw_interface_set_mtu ");
3328  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
3329  s = format (s, "tag %d ", (mp->mtu));
3330 
3331  FINISH;
3332 }
3333 
3335  (vl_api_p2p_ethernet_add_t * mp, void *handle)
3336 {
3337  u8 *s;
3338 
3339  s = format (0, "SCRIPT: p2p_ethernet_add ");
3340  s = format (s, "sw_if_index %d ", (mp->parent_if_index));
3341  s = format (s, "remote_mac %U ", format_ethernet_address, mp->remote_mac);
3342 
3343  FINISH;
3344 }
3345 
3347  (vl_api_p2p_ethernet_del_t * mp, void *handle)
3348 {
3349  u8 *s;
3350 
3351  s = format (0, "SCRIPT: p2p_ethernet_del ");
3352  s = format (s, "sw_if_index %d ", (mp->parent_if_index));
3353  s = format (s, "remote_mac %U ", format_ethernet_address, mp->remote_mac);
3354 
3355  FINISH;
3356 }
3357 
3360 {
3361  u8 *s;
3362 
3363  s = format (0, "SCRIPT: tcp_configure_src_addresses ");
3364  s = format (s, "%U - %U ",
3367 
3368  if (mp->vrf_id)
3369  s = format (s, "vrf %d ", (mp->vrf_id));
3370 
3371  FINISH;
3372 }
3373 
3375  (vl_api_app_namespace_add_del_t * mp, void *handle)
3376 {
3377  u8 *s;
3379  ARRAY_LEN (mp->namespace_id) - 1);
3380  mp->namespace_id[len] = 0;
3381  s = format (0, "SCRIPT: app_namespace_add_del ");
3382  s = format (s, "ns-id %s secret %lu sw_if_index %d ipv4_fib_id %d "
3383  "ipv6_fib_id %d", (char *) mp->namespace_id, mp->secret,
3384  (mp->sw_if_index), (mp->ip4_fib_id), (mp->ip6_fib_id));
3385  FINISH;
3386 }
3387 
3389  (vl_api_sw_interface_set_lldp_t * mp, void *handle)
3390 {
3391  u8 *s;
3392  u8 null_data[256];
3393 
3394  clib_memset (null_data, 0, sizeof (null_data));
3395 
3396  s = format (0, "SCRIPT: sw_interface_set_lldp ");
3397  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
3398 
3399  if (memcmp (mp->port_desc, null_data, sizeof (mp->port_desc)))
3400  s = format (s, "port_desc %s ", mp->port_desc);
3401 
3402  if (memcmp (mp->mgmt_ip4, null_data, sizeof (mp->mgmt_ip4)))
3403  s = format (s, "mgmt_ip4 %U ", format_ip4_address, mp->mgmt_ip4);
3404 
3405  if (memcmp (mp->mgmt_ip6, null_data, sizeof (mp->mgmt_ip6)))
3406  s = format (s, "mgmt_ip6 %U ", format_ip6_address, mp->mgmt_ip6);
3407 
3408  if (memcmp (mp->mgmt_oid, null_data, sizeof (mp->mgmt_oid)))
3409  s = format (s, "mgmt_oid %s ", mp->mgmt_oid);
3410 
3411  if (mp->enable == 0)
3412  s = format (s, "disable ");
3413 
3414  FINISH;
3415 }
3416 
3417 static void *vl_api_lldp_config_t_print
3418  (vl_api_lldp_config_t * mp, void *handle)
3419 {
3420  u8 *s;
3421 
3422  s = format (0, "SCRIPT: lldp_config ");
3423  s = format (s, "system_name %s ", mp->system_name);
3424  s = format (s, "tx_hold %d ", (mp->tx_hold));
3425  s = format (s, "tx_interval %d ", (mp->tx_interval));
3426  FINISH;
3427 }
3428 
3430  (vl_api_session_rule_add_del_t * mp, void *handle)
3431 {
3432  u8 *s;
3433  char *proto = mp->transport_proto == 0 ? "tcp" : "udp";
3434  s = format (0, "SCRIPT: session_rule_add_del ");
3435  mp->tag[sizeof (mp->tag) - 1] = 0;
3436  if (mp->is_ip4)
3437  s = format (s, "appns %d scope %d %s %U/%d %d %U/%d %d action %u tag %s",
3438  mp->appns_index, mp->scope, proto, format_ip4_address,
3439  (ip4_address_t *) mp->lcl_ip, mp->lcl_plen,
3441  mp->rmt_plen, mp->action_index, mp->tag);
3442  else
3443  s = format (s, "appns %d scope %d %s %U/%d %d %U/%d %d action %u tag %s",
3444  mp->appns_index, mp->scope, proto, format_ip6_address,
3445  (ip6_address_t *) mp->lcl_ip, mp->lcl_plen,
3447  mp->rmt_plen, mp->action_index, mp->tag);
3448  FINISH;
3449 }
3450 
3451 __clib_unused
3454 {
3455  u8 *s;
3456  s = format (0, "SCRIPT: ip_container_proxy_add_del ");
3457  s = format (s, "is_add %d prefix %U sw_if_index %d",
3459 
3460  FINISH;
3461 }
3462 
3465 {
3466  u8 *s;
3467 
3468  s = format (0, "SCRIPT: qos_record_enable_disable ");
3469  s = format (s, "sw_if_index %d ", (mp->record.sw_if_index));
3470  s = format (s, "input_source %U ", format_qos_source,
3471  mp->record.input_source);
3472 
3473  if (!mp->enable)
3474  s = format (s, "disable ");
3475 
3476  FINISH;
3477 }
3478 
3479 #define foreach_no_print_function \
3480 _(memclnt_keepalive_reply)
3481 
3482 #define _(f) \
3483 static void * vl_api_ ## f ## _t_print \
3484  (vl_api_ ## f ## _t * mp, void * handle) \
3485 { \
3486  return handle; \
3487 }
3489 #undef _
3490 
3491 #define foreach_custom_print_no_arg_function \
3492 _(lisp_eid_table_vni_dump) \
3493 _(lisp_map_resolver_dump) \
3494 _(lisp_map_server_dump) \
3495 _(show_lisp_rloc_probe_state) \
3496 _(show_lisp_map_register_state) \
3497 _(show_lisp_map_request_mode)
3498 
3499 #define _(f) \
3500 static void * vl_api_ ## f ## _t_print \
3501  (vl_api_ ## f ## _t * mp, void * handle) \
3502 { \
3503  u8 * s; \
3504  s = format (0, "SCRIPT: " #f ); \
3505  FINISH; \
3506 }
3508 #undef _
3509 #define foreach_custom_print_function \
3510 _(CREATE_LOOPBACK, create_loopback) \
3511 _(CREATE_LOOPBACK_INSTANCE, create_loopback_instance) \
3512 _(SW_INTERFACE_SET_FLAGS, sw_interface_set_flags) \
3513 _(SW_INTERFACE_EVENT, sw_interface_event) \
3514 _(SW_INTERFACE_ADD_DEL_ADDRESS, sw_interface_add_del_address) \
3515 _(SW_INTERFACE_SET_TABLE, sw_interface_set_table) \
3516 _(SW_INTERFACE_SET_MPLS_ENABLE, sw_interface_set_mpls_enable) \
3517 _(SW_INTERFACE_SET_VPATH, sw_interface_set_vpath) \
3518 _(SW_INTERFACE_SET_VXLAN_BYPASS, sw_interface_set_vxlan_bypass) \
3519 _(SW_INTERFACE_SET_GENEVE_BYPASS, sw_interface_set_geneve_bypass) \
3520 _(BOND_CREATE, bond_create) \
3521 _(BOND_DELETE, bond_delete) \
3522 _(BOND_ENSLAVE, bond_enslave) \
3523 _(BOND_DETACH_SLAVE, bond_detach_slave) \
3524 _(SW_INTERFACE_SET_BOND_WEIGHT, sw_interface_set_bond_weight) \
3525 _(SW_INTERFACE_SLAVE_DUMP, sw_interface_slave_dump) \
3526 _(SW_INTERFACE_BOND_DUMP, sw_interface_bond_dump) \
3527 _(SW_INTERFACE_RX_PLACEMENT_DUMP, sw_interface_rx_placement_dump) \
3528 _(TAP_CREATE_V2, tap_create_v2) \
3529 _(TAP_DELETE_V2, tap_delete_v2) \
3530 _(SW_INTERFACE_TAP_V2_DUMP, sw_interface_tap_v2_dump) \
3531 _(IP_TABLE_ADD_DEL, ip_table_add_del) \
3532 _(MPLS_ROUTE_ADD_DEL, mpls_route_add_del) \
3533 _(MPLS_TABLE_ADD_DEL, mpls_table_add_del) \
3534 _(IP_ROUTE_ADD_DEL, ip_route_add_del) \
3535 _(MPLS_TUNNEL_ADD_DEL, mpls_tunnel_add_del) \
3536 _(SR_MPLS_POLICY_ADD, sr_mpls_policy_add) \
3537 _(SR_MPLS_POLICY_DEL, sr_mpls_policy_del) \
3538 _(SW_INTERFACE_SET_UNNUMBERED, sw_interface_set_unnumbered) \
3539 _(CREATE_VLAN_SUBIF, create_vlan_subif) \
3540 _(CREATE_SUBIF, create_subif) \
3541 _(IP_TABLE_REPLACE_BEGIN, ip_table_replace_begin) \
3542 _(IP_TABLE_FLUSH, ip_table_flush) \
3543 _(IP_TABLE_REPLACE_END, ip_table_replace_end) \
3544 _(SET_IP_FLOW_HASH, set_ip_flow_hash) \
3545 _(L2_PATCH_ADD_DEL, l2_patch_add_del) \
3546 _(SR_LOCALSID_ADD_DEL, sr_localsid_add_del) \
3547 _(SR_STEERING_ADD_DEL, sr_steering_add_del) \
3548 _(SR_POLICY_ADD, sr_policy_add) \
3549 _(SR_POLICY_MOD, sr_policy_mod) \
3550 _(SR_POLICY_DEL, sr_policy_del) \
3551 _(SW_INTERFACE_SET_L2_XCONNECT, sw_interface_set_l2_xconnect) \
3552 _(L2FIB_ADD_DEL, l2fib_add_del) \
3553 _(L2FIB_FLUSH_ALL, l2fib_flush_all) \
3554 _(L2FIB_FLUSH_BD, l2fib_flush_bd) \
3555 _(L2FIB_FLUSH_INT, l2fib_flush_int) \
3556 _(L2_FLAGS, l2_flags) \
3557 _(BRIDGE_FLAGS, bridge_flags) \
3558 _(CLASSIFY_ADD_DEL_TABLE, classify_add_del_table) \
3559 _(CLASSIFY_ADD_DEL_SESSION, classify_add_del_session) \
3560 _(SW_INTERFACE_SET_L2_BRIDGE, sw_interface_set_l2_bridge) \
3561 _(BRIDGE_DOMAIN_ADD_DEL, bridge_domain_add_del) \
3562 _(BRIDGE_DOMAIN_DUMP, bridge_domain_dump) \
3563 _(BRIDGE_DOMAIN_SET_MAC_AGE, bridge_domain_set_mac_age) \
3564 _(CLASSIFY_SET_INTERFACE_IP_TABLE, classify_set_interface_ip_table) \
3565 _(CLASSIFY_SET_INTERFACE_L2_TABLES, classify_set_interface_l2_tables) \
3566 _(ADD_NODE_NEXT, add_node_next) \
3567 _(L2TPV3_CREATE_TUNNEL, l2tpv3_create_tunnel) \
3568 _(L2TPV3_SET_TUNNEL_COOKIES, l2tpv3_set_tunnel_cookies) \
3569 _(L2TPV3_INTERFACE_ENABLE_DISABLE, l2tpv3_interface_enable_disable) \
3570 _(L2TPV3_SET_LOOKUP_KEY, l2tpv3_set_lookup_key) \
3571 _(SW_IF_L2TPV3_TUNNEL_DUMP, sw_if_l2tpv3_tunnel_dump) \
3572 _(VXLAN_ADD_DEL_TUNNEL, vxlan_add_del_tunnel) \
3573 _(VXLAN_TUNNEL_DUMP, vxlan_tunnel_dump) \
3574 _(VXLAN_OFFLOAD_RX, vxlan_offload_rx) \
3575 _(GENEVE_ADD_DEL_TUNNEL, geneve_add_del_tunnel) \
3576 _(GENEVE_TUNNEL_DUMP, geneve_tunnel_dump) \
3577 _(GRE_TUNNEL_ADD_DEL, gre_tunnel_add_del) \
3578 _(GRE_TUNNEL_DUMP, gre_tunnel_dump) \
3579 _(L2_FIB_CLEAR_TABLE, l2_fib_clear_table) \
3580 _(L2_INTERFACE_EFP_FILTER, l2_interface_efp_filter) \
3581 _(L2_INTERFACE_VLAN_TAG_REWRITE, l2_interface_vlan_tag_rewrite) \
3582 _(CREATE_VHOST_USER_IF, create_vhost_user_if) \
3583 _(MODIFY_VHOST_USER_IF, modify_vhost_user_if) \
3584 _(DELETE_VHOST_USER_IF, delete_vhost_user_if) \
3585 _(SW_INTERFACE_DUMP, sw_interface_dump) \
3586 _(CONTROL_PING, control_ping) \
3587 _(WANT_INTERFACE_EVENTS, want_interface_events) \
3588 _(CLI, cli) \
3589 _(CLI_INBAND, cli_inband) \
3590 _(MEMCLNT_CREATE, memclnt_create) \
3591 _(SOCKCLNT_CREATE, sockclnt_create) \
3592 _(SW_INTERFACE_VHOST_USER_DUMP, sw_interface_vhost_user_dump) \
3593 _(SHOW_VERSION, show_version) \
3594 _(L2_FIB_TABLE_DUMP, l2_fib_table_dump) \
3595 _(VXLAN_GPE_ADD_DEL_TUNNEL, vxlan_gpe_add_del_tunnel) \
3596 _(VXLAN_GPE_TUNNEL_DUMP, vxlan_gpe_tunnel_dump) \
3597 _(VXLAN_GBP_TUNNEL_ADD_DEL, vxlan_gbp_tunnel_add_del) \
3598 _(VXLAN_GBP_TUNNEL_DUMP, vxlan_gbp_tunnel_dump) \
3599 _(SW_INTERFACE_SET_VXLAN_GBP_BYPASS, sw_interface_set_vxlan_gbp_bypass) \
3600 _(INTERFACE_NAME_RENUMBER, interface_name_renumber) \
3601 _(WANT_L2_MACS_EVENTS, want_l2_macs_events) \
3602 _(INPUT_ACL_SET_INTERFACE, input_acl_set_interface) \
3603 _(IP_ADDRESS_DUMP, ip_address_dump) \
3604 _(IP_DUMP, ip_dump) \
3605 _(DELETE_LOOPBACK, delete_loopback) \
3606 _(BD_IP_MAC_ADD_DEL, bd_ip_mac_add_del) \
3607 _(BD_IP_MAC_FLUSH, bd_ip_mac_flush) \
3608 _(COP_INTERFACE_ENABLE_DISABLE, cop_interface_enable_disable) \
3609 _(COP_WHITELIST_ENABLE_DISABLE, cop_whitelist_enable_disable) \
3610 _(AF_PACKET_CREATE, af_packet_create) \
3611 _(AF_PACKET_DELETE, af_packet_delete) \
3612 _(AF_PACKET_DUMP, af_packet_dump) \
3613 _(SW_INTERFACE_CLEAR_STATS, sw_interface_clear_stats) \
3614 _(MPLS_TABLE_DUMP, mpls_table_dump) \
3615 _(MPLS_ROUTE_DUMP, mpls_route_dump) \
3616 _(MPLS_TUNNEL_DUMP, mpls_tunnel_dump) \
3617 _(CLASSIFY_TABLE_IDS,classify_table_ids) \
3618 _(CLASSIFY_TABLE_BY_INTERFACE, classify_table_by_interface) \
3619 _(CLASSIFY_TABLE_INFO,classify_table_info) \
3620 _(CLASSIFY_SESSION_DUMP,classify_session_dump) \
3621 _(SET_IPFIX_EXPORTER, set_ipfix_exporter) \
3622 _(IPFIX_EXPORTER_DUMP, ipfix_exporter_dump) \
3623 _(SET_IPFIX_CLASSIFY_STREAM, set_ipfix_classify_stream) \
3624 _(IPFIX_CLASSIFY_STREAM_DUMP, ipfix_classify_stream_dump) \
3625 _(IPFIX_CLASSIFY_TABLE_ADD_DEL, ipfix_classify_table_add_del) \
3626 _(IPFIX_CLASSIFY_TABLE_DUMP, ipfix_classify_table_dump) \
3627 _(SW_INTERFACE_SPAN_ENABLE_DISABLE, sw_interface_span_enable_disable) \
3628 _(SW_INTERFACE_SPAN_DUMP, sw_interface_span_dump) \
3629 _(GET_NEXT_INDEX, get_next_index) \
3630 _(PG_CREATE_INTERFACE,pg_create_interface) \
3631 _(PG_CAPTURE, pg_capture) \
3632 _(PG_ENABLE_DISABLE, pg_enable_disable) \
3633 _(POLICER_ADD_DEL, policer_add_del) \
3634 _(POLICER_DUMP, policer_dump) \
3635 _(POLICER_CLASSIFY_SET_INTERFACE, policer_classify_set_interface) \
3636 _(POLICER_CLASSIFY_DUMP, policer_classify_dump) \
3637 _(IP_SOURCE_AND_PORT_RANGE_CHECK_ADD_DEL, \
3638  ip_source_and_port_range_check_add_del) \
3639 _(IP_SOURCE_AND_PORT_RANGE_CHECK_INTERFACE_ADD_DEL, \
3640  ip_source_and_port_range_check_interface_add_del) \
3641 _(LISP_ENABLE_DISABLE, lisp_enable_disable) \
3642 _(GPE_ENABLE_DISABLE, gpe_enable_disable) \
3643 _(GPE_ADD_DEL_IFACE, gpe_add_del_iface) \
3644 _(LISP_PITR_SET_LOCATOR_SET, lisp_pitr_set_locator_set) \
3645 _(LISP_MAP_REQUEST_MODE, lisp_map_request_mode) \
3646 _(SHOW_LISP_MAP_REQUEST_MODE, show_lisp_map_request_mode) \
3647 _(LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping) \
3648 _(LISP_ADD_DEL_ADJACENCY, lisp_add_del_adjacency) \
3649 _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS, \
3650  lisp_add_del_map_request_itr_rlocs) \
3651 _(LISP_EID_TABLE_ADD_DEL_MAP, lisp_eid_table_add_del_map) \
3652 _(LISP_ADD_DEL_LOCAL_EID, lisp_add_del_local_eid) \
3653 _(GPE_ADD_DEL_FWD_ENTRY, gpe_add_del_fwd_entry) \
3654 _(LISP_ADD_DEL_LOCATOR_SET, lisp_add_del_locator_set) \
3655 _(LISP_ADD_DEL_MAP_RESOLVER, lisp_add_del_map_resolver) \
3656 _(LISP_ADD_DEL_LOCATOR, lisp_add_del_locator) \
3657 _(LISP_EID_TABLE_DUMP, lisp_eid_table_dump) \
3658 _(LISP_EID_TABLE_MAP_DUMP, lisp_eid_table_map_dump) \
3659 _(LISP_EID_TABLE_VNI_DUMP, lisp_eid_table_vni_dump) \
3660 _(LISP_MAP_RESOLVER_DUMP, lisp_map_resolver_dump) \
3661 _(LISP_MAP_SERVER_DUMP, lisp_map_server_dump) \
3662 _(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump) \
3663 _(LISP_LOCATOR_DUMP, lisp_locator_dump) \
3664 _(LISP_ADJACENCIES_GET, lisp_adjacencies_get) \
3665 _(SHOW_LISP_RLOC_PROBE_STATE, show_lisp_rloc_probe_state) \
3666 _(SHOW_LISP_MAP_REGISTER_STATE, show_lisp_map_register_state) \
3667 _(LISP_RLOC_PROBE_ENABLE_DISABLE, lisp_rloc_probe_enable_disable) \
3668 _(LISP_MAP_REGISTER_ENABLE_DISABLE, lisp_map_register_enable_disable) \
3669 _(IPSEC_INTERFACE_ADD_DEL_SPD, ipsec_interface_add_del_spd) \
3670 _(IPSEC_SAD_ENTRY_ADD_DEL, ipsec_sad_entry_add_del) \
3671 _(IPSEC_SPD_ADD_DEL, ipsec_spd_add_del) \
3672 _(IPSEC_SPD_ENTRY_ADD_DEL, ipsec_spd_entry_add_del) \
3673 _(IPSEC_TUNNEL_IF_ADD_DEL, ipsec_tunnel_if_add_del) \
3674 _(DELETE_SUBIF, delete_subif) \
3675 _(L2_INTERFACE_PBB_TAG_REWRITE, l2_interface_pbb_tag_rewrite) \
3676 _(SET_PUNT, set_punt) \
3677 _(FLOW_CLASSIFY_SET_INTERFACE, flow_classify_set_interface) \
3678 _(FLOW_CLASSIFY_DUMP, flow_classify_dump) \
3679 _(GET_FIRST_MSG_ID, get_first_msg_id) \
3680 _(IOAM_ENABLE, ioam_enable) \
3681 _(IOAM_DISABLE, ioam_disable) \
3682 _(IP_TABLE_DUMP, ip_table_dump) \
3683 _(IP_ROUTE_DUMP, ip_route_dump) \
3684 _(FEATURE_ENABLE_DISABLE, feature_enable_disable) \
3685 _(FEATURE_GSO_ENABLE_DISABLE, feature_gso_enable_disable) \
3686 _(SW_INTERFACE_TAG_ADD_DEL, sw_interface_tag_add_del) \
3687 _(HW_INTERFACE_SET_MTU, hw_interface_set_mtu) \
3688 _(P2P_ETHERNET_ADD, p2p_ethernet_add) \
3689 _(P2P_ETHERNET_DEL, p2p_ethernet_del) \
3690 _(TCP_CONFIGURE_SRC_ADDRESSES, tcp_configure_src_addresses) \
3691 _(APP_NAMESPACE_ADD_DEL, app_namespace_add_del) \
3692 _(LLDP_CONFIG, lldp_config) \
3693 _(SW_INTERFACE_SET_LLDP, sw_interface_set_lldp) \
3694 _(SESSION_RULE_ADD_DEL, session_rule_add_del) \
3695 _(OUTPUT_ACL_SET_INTERFACE, output_acl_set_interface) \
3696 _(QOS_RECORD_ENABLE_DISABLE, qos_record_enable_disable) \
3697 _(MEMCLNT_KEEPALIVE_REPLY, memclnt_keepalive_reply)
3698 
3699 void
3701 {
3702 #define _(n,f) am->msg_print_handlers[VL_API_##n] \
3703  = (void *) vl_api_##f##_t_print;
3705 #undef _
3706 }
3707 
3708 /*
3709  * fd.io coding-style-patch-verification: ON
3710  *
3711  * Local Variables:
3712  * eval: (c-set-style "gnu")
3713  * End:
3714  */
static void * vl_api_sw_interface_set_flags_t_print(vl_api_sw_interface_set_flags_t *mp, void *handle)
Definition: custom_dump.c:109
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
Definition: vec.h:440
static void * vl_api_create_vhost_user_if_t_print(vl_api_create_vhost_user_if_t *mp, void *handle)
Definition: custom_dump.c:1713
static u8 * format_lisp_flat_eid(u8 *s, va_list *args)
Definition: custom_dump.c:2634
u32 match_n_vectors[default=1]
Definition: classify.api:55
static void * vl_api_sr_mpls_policy_add_t_print(vl_api_sr_mpls_policy_add_t *mp, void *handle)
Definition: custom_dump.c:859
bool is_add[default=true]
Definition: ip.api:162
static void * vl_api_bridge_domain_add_del_t_print(vl_api_bridge_domain_add_del_t *mp, void *handle)
Definition: custom_dump.c:331
static void * vl_api_classify_set_interface_l2_tables_t_print(vl_api_classify_set_interface_l2_tables_t *mp, void *handle)
Definition: custom_dump.c:1356
static void * vl_api_lisp_add_del_adjacency_t_print(vl_api_lisp_add_del_adjacency_t *mp, void *handle)
Definition: custom_dump.c:2683
Get list of policers.
Definition: policer.api:79
vl_api_vxlan_gbp_tunnel_t tunnel
Definition: vxlan_gbp.api:58
vl_api_interface_index_t sw_if_index
Definition: interface.api:91
vl_api_interface_index_t mcast_sw_if_index
Definition: geneve.api:29
add or delete gpe_iface
Definition: lisp_gpe.api:89
static void * vl_api_sw_interface_set_mpls_enable_t_print(vl_api_sw_interface_set_mpls_enable_t *mp, void *handle)
Definition: custom_dump.c:216
Classify get table IDs request.
Definition: classify.api:194
#define SR_STEER_IPV6
Definition: sr_mpls.h:42
IPsec: Add/delete Security Policy Database entry.
Definition: ipsec.api:118
static void * vl_api_lisp_pitr_set_locator_set_t_print(vl_api_lisp_pitr_set_locator_set_t *mp, void *handle)
Definition: custom_dump.c:2619
L2 FIB add entry request.
Definition: l2.api:129
cop: enable/disable whitelist filtration features on an interface Note: the supplied fib_id must matc...
Definition: cop.api:47
static void * vl_api_l2tpv3_set_tunnel_cookies_t_print(vl_api_l2tpv3_set_tunnel_cookies_t *mp, void *handle)
Definition: custom_dump.c:1407
static void * vl_api_sw_if_l2tpv3_tunnel_dump_t_print(vl_api_sw_if_l2tpv3_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1468
u8 proto
Definition: acl_types.api:47
static void * vl_api_vxlan_offload_rx_t_print(vl_api_vxlan_offload_rx_t *mp, void *handle)
Definition: custom_dump.c:1512
u8 * format_hmac_key_id(u8 *s, va_list *args)
Definition: lisp_types.c:342
static void * vl_api_delete_subif_t_print(vl_api_delete_subif_t *mp, void *handle)
Definition: custom_dump.c:963
static void * vl_api_l2_patch_add_del_t_print(vl_api_l2_patch_add_del_t *mp, void *handle)
Definition: custom_dump.c:1049
vl_api_bond_mode_t mode
Definition: bond.api:63
#define clib_min(x, y)
Definition: clib.h:295
static void * vl_api_lisp_locator_set_dump_t_print(vl_api_lisp_locator_set_dump_t *mp, void *handle)
Definition: custom_dump.c:2824
static void * vl_api_lisp_map_request_mode_t_print(vl_api_lisp_map_request_mode_t *mp, void *handle)
Definition: custom_dump.c:2852
vl_api_l2t_lookup_key_t key
Definition: l2tp.api:108
enable/disable LISP RLOC probing
Definition: lisp.api:233
static void * vl_api_delete_loopback_t_print(vl_api_delete_loopback_t *mp, void *handle)
Definition: custom_dump.c:98
Dump MPLS fib table.
Definition: mpls.api:179
IPFIX classify tables dump request.
static void * vl_api_sw_interface_slave_dump_t_print(vl_api_sw_interface_slave_dump_t *mp, void *handle)
Definition: custom_dump.c:740
static __clib_unused void * vl_api_virtio_pci_delete_t_print(vl_api_virtio_pci_delete_t *mp, void *handle)
Definition: custom_dump.c:635
#define SR_STEER_IPV4
Definition: sr_mpls.h:41
u8 * format_vl_api_mac_address(u8 *s, va_list *args)
Definition: types.c:98
static uword ip46_address_is_multicast(const ip46_address_t *a)
Definition: ip46_address.h:154
vl_api_mac_address_t mac_address
Definition: bond.api:62
static void * vl_api_sr_mpls_policy_del_t_print(vl_api_sr_mpls_policy_del_t *mp, void *handle)
Definition: custom_dump.c:884
string cmd[]
Definition: vpe.api:95
#define SR_BEHAVIOR_X
Definition: sr.h:38
u8 * format_vl_api_fib_path(u8 *s, va_list *args)
Definition: fib_api.c:506
static void * vl_api_geneve_tunnel_dump_t_print(vl_api_geneve_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1620
Create or delete a VXLAN-GBP tunnel.
Definition: vxlan_gbp.api:53
vl_api_l2_port_type_t port_type
Definition: l2.api:473
static void * vl_api_lisp_add_del_locator_t_print(vl_api_lisp_add_del_locator_t *mp, void *handle)
Definition: custom_dump.c:2807
static void * vl_api_vxlan_gbp_tunnel_dump_t_print(vl_api_vxlan_gbp_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1560
static void * vl_api_cli_inband_t_print(vl_api_cli_inband_t *mp, void *handle)
Definition: custom_dump.c:1839
static void * vl_api_bond_enslave_t_print(vl_api_bond_enslave_t *mp, void *handle)
Definition: custom_dump.c:691
Interface set bond weight.
Definition: bond.api:199
vl_api_address_t client_address
Definition: l2tp.api:38
vnet_main_t * vnet_get_main(void)
Definition: misc.c:46
static void * vl_api_ioam_enable_t_print(vl_api_ioam_enable_t *mp, void *handle)
Definition: custom_dump.c:3242
vl_api_interface_index_t unnumbered_sw_if_index
Definition: interface.api:283
static void * vl_api_lisp_adjacencies_get_t_print(vl_api_lisp_adjacencies_get_t *mp, void *handle)
Definition: custom_dump.c:2926
Set/unset policer classify interface.
Definition: classify.api:145
static void * vl_api_sw_interface_tag_add_del_t_print(vl_api_sw_interface_tag_add_del_t *mp, void *handle)
Definition: custom_dump.c:3308
configure or disable LISP PITR node
Definition: lisp.api:157
Set flags on the interface.
Definition: interface.api:35
static __clib_unused void * vl_api_virtio_pci_create_t_print(vl_api_virtio_pci_create_t *mp, void *handle)
Definition: custom_dump.c:612
Control ping from client to api server request.
Definition: vpe.api:60
bool mt_is_add[default=true]
Definition: mpls.api:56
vl_api_interface_index_t sw_if_index
Definition: interface.api:420
u8 as_u8[16]
Definition: ip6_packet.h:48
static void * vl_api_flow_classify_set_interface_t_print(vl_api_flow_classify_set_interface_t *mp, void *handle)
Definition: custom_dump.c:3166
static void * vl_api_interface_name_renumber_t_print(vl_api_interface_name_renumber_t *mp, void *handle)
Definition: custom_dump.c:1943
static void * vl_api_add_node_next_t_print(vl_api_add_node_next_t *mp, void *handle)
Definition: custom_dump.c:1372
static void * vl_api_l2_fib_clear_table_t_print(vl_api_l2_fib_clear_table_t *mp, void *handle)
Definition: custom_dump.c:1671
vl_api_ip_table_t table
Definition: ip.api:120
static void * vl_api_bd_ip_mac_flush_t_print(vl_api_bd_ip_mac_flush_t *mp, void *handle)
Definition: custom_dump.c:517
u32 id[default=0xffffffff]
Definition: tapv2.api:67
static void * vl_api_sr_steering_add_del_t_print(vl_api_sr_steering_add_del_t *mp, void *handle)
Definition: custom_dump.c:1146
iOAM disable
Definition: ip.api:566
vl_api_interface_index_t sw_if_index
Definition: bond.api:89
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void * vl_api_ip_table_dump_t_print(vl_api_ip_table_dump_t *mp, void *handle)
Definition: custom_dump.c:2300
static void * vl_api_lisp_eid_table_add_del_map_t_print(vl_api_lisp_eid_table_add_del_map_t *mp, void *handle)
Definition: custom_dump.c:2714
static __clib_unused void * vl_api_show_threads_t_print(vl_api_show_threads_t *mp, void *handle)
Definition: custom_dump.c:1886
Interface set vxlan-bypass request.
Definition: vxlan.api:81
add/del session rule
Definition: session.api:504
u8 * format_vl_api_address(u8 *s, va_list *args)
Definition: types.c:39
static void * vl_api_input_acl_set_interface_t_print(vl_api_input_acl_set_interface_t *mp, void *handle)
Definition: custom_dump.c:1972
Set an interface&#39;s rx-placement Rx-Queue placement on specific thread is operational for only hardwar...
Definition: interface.api:400
VXLAN GPE definitions.
static void * vl_api_control_ping_t_print(vl_api_control_ping_t *mp, void *handle)
Definition: custom_dump.c:1808
Dump af_packet interfaces request.
Definition: af_packet.api:76
Definition: l2_bd.h:152
static void * vl_api_mpls_tunnel_add_del_t_print(vl_api_mpls_tunnel_add_del_t *mp, void *handle)
Definition: custom_dump.c:832
static void * vl_api_lisp_add_del_locator_set_t_print(vl_api_lisp_add_del_locator_set_t *mp, void *handle)
Definition: custom_dump.c:2792
bool is_ipv6
Definition: ip.api:369
Classify add / del session request.
Definition: classify.api:119
IPFIX exporter dump request.
vl_api_interface_index_t sw_if_index
Definition: interface.api:461
#define SR_BEHAVIOR_DT6
Definition: sr.h:44
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Definition: vec.h:523
vl_api_interface_index_t sw_if_index
Definition: virtio.api:66
vl_api_address_t first_address
Definition: tcp.api:42
u32 memory_size[default=2097152]
Definition: classify.api:53
u8 bsid_addr[16]
Definition: sr.api:81
static void * vl_api_bridge_domain_dump_t_print(vl_api_bridge_domain_dump_t *mp, void *handle)
Definition: custom_dump.c:368
vl_api_address_t src
Definition: gre.api:60
static void * vl_api_lisp_eid_table_map_dump_t_print(vl_api_lisp_eid_table_map_dump_t *mp, void *handle)
Definition: custom_dump.c:2937
L2 bridge domain set mac age.
Definition: l2.api:234
static void * vl_api_l2_interface_vlan_tag_rewrite_t_print(vl_api_l2_interface_vlan_tag_rewrite_t *mp, void *handle)
Definition: custom_dump.c:1697
static void * vl_api_mpls_route_dump_t_print(vl_api_mpls_route_dump_t *mp, void *handle)
Definition: custom_dump.c:2290
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
Definition: vec.h:561
for(i=1;i<=collision_buckets;i++)
int i
static void * vl_api_bond_create_t_print(vl_api_bond_create_t *mp, void *handle)
Definition: custom_dump.c:657
static void * vl_api_flow_classify_dump_t_print(vl_api_flow_classify_dump_t *mp, void *handle)
Definition: custom_dump.c:3211
vl_api_mac_address_t mac_address
Definition: interface.api:548
static void * vl_api_want_interface_events_t_print(vl_api_want_interface_events_t *mp, void *handle)
Definition: custom_dump.c:1818
static void * vl_api_sw_interface_clear_stats_t_print(vl_api_sw_interface_clear_stats_t *mp, void *handle)
Definition: custom_dump.c:2257
u32 table_index[default=0xffffffff]
Definition: classify.api:51
Add / del route request.
Definition: ip.api:158
Request for lisp_eid_table_map_details.
Definition: lisp.api:611
Initialize a new virtio pci interface with the given parameters.
Definition: virtio.api:33
u8 * format(u8 *s, const char *fmt,...)
Definition: format.c:424
Dump virtio pci interfaces request.
Definition: virtio.api:70
Add/Delete classification table request.
Definition: classify.api:45
static void * vl_api_sw_interface_set_bond_weight_t_print(vl_api_sw_interface_set_bond_weight_t *mp, void *handle)
Definition: custom_dump.c:707
bool is_add[default=true]
Definition: ip.api:56
L2 bridge domain request operational state details.
Definition: l2.api:276
static void * vl_api_session_rule_add_del_t_print(vl_api_session_rule_add_del_t *mp, void *handle)
Definition: custom_dump.c:3430
static void * vl_api_output_acl_set_interface_t_print(vl_api_output_acl_set_interface_t *mp, void *handle)
Definition: custom_dump.c:1990
Enable / disable packet generator request.
Definition: pg.api:75
static void * vl_api_classify_add_del_table_t_print(vl_api_classify_add_del_table_t *mp, void *handle)
Definition: custom_dump.c:1273
vhost-user interface create request
Definition: vhost_user.api:32
vl_api_address_t remote_address
Definition: geneve.api:28
vl_api_mac_address_t mac_address
Definition: tapv2.api:69
static void * vl_api_vxlan_gpe_add_del_tunnel_t_print(vl_api_vxlan_gpe_add_del_tunnel_t *mp, void *handle)
Definition: custom_dump.c:1896
u8 is_add
Definition: ipsec.api:122
vl_api_interface_index_t sw_if_index
Definition: bond.api:171
static void * vl_api_bridge_flags_t_print(vl_api_bridge_flags_t *mp, void *handle)
Definition: custom_dump.c:474
format_function_t format_vnet_sw_if_index_name
static void * vl_api_l2tpv3_interface_enable_disable_t_print(vl_api_l2tpv3_interface_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:1425
Delete virtio pci interface.
Definition: virtio.api:62
unsigned char u8
Definition: types.h:56
vl_api_interface_index_t sw_if_index
Definition: ip.api:333
static void * vl_api_sw_interface_set_l2_xconnect_t_print(vl_api_sw_interface_set_l2_xconnect_t *mp, void *handle)
Definition: custom_dump.c:288
vl_api_address_t remote_ip
Definition: ipsec.api:343
vl_api_srv6_sid_list_t sids
Definition: sr.api:110
#define SR_BEHAVIOR_DT4
Definition: sr.h:45
static void * vl_api_ip_dump_t_print(vl_api_ip_dump_t *mp, void *handle)
Definition: custom_dump.c:2020
static void * vl_api_l2fib_add_del_t_print(vl_api_l2fib_add_del_t *mp, void *handle)
Definition: custom_dump.c:417
Process a vpe parser cli string request.
Definition: vpe.api:85
static void * vl_api_l2_flags_t_print(vl_api_l2_flags_t *mp, void *handle)
Definition: custom_dump.c:447
static void * vl_api_create_vlan_subif_t_print(vl_api_create_vlan_subif_t *mp, void *handle)
Definition: custom_dump.c:913
static void * vl_api_l2fib_flush_bd_t_print(vl_api_l2fib_flush_bd_t *mp, void *handle)
Definition: custom_dump.c:393
static void * vl_api_lisp_enable_disable_t_print(vl_api_lisp_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2594
vl_api_interface_index_t sw_if_index
Definition: cop.api:31
#define clib_memcpy(d, s, n)
Definition: string.h:180
vl_api_mac_address_t mac_address
Definition: interface.api:522
static void * vl_api_sockclnt_create_t_print(vl_api_sockclnt_create_t *mp, void *handle)
Definition: custom_dump.c:1865
static void * vl_api_sr_policy_add_t_print(vl_api_sr_policy_add_t *mp, void *handle)
Definition: custom_dump.c:1182
Vhost-user interface dump request.
Definition: vhost_user.api:116
Dump tap interfaces request.
Definition: tapv2.api:122
vl_api_mac_address_t hw_addr
Definition: af_packet.api:33
add or delete LISP adjacency adjacency
Definition: lisp.api:365
u8 pcap_file_name[pcap_name_length]
Definition: pg.api:66
static void * vl_api_p2p_ethernet_del_t_print(vl_api_p2p_ethernet_del_t *mp, void *handle)
Definition: custom_dump.c:3347
vl_api_interface_index_t parent_if_index
PacketGenerator capture packets on given interface request.
Definition: pg.api:58
vl_api_interface_index_t sw_if_index
Definition: interface.api:510
static void * vl_api_vxlan_gpe_tunnel_dump_t_print(vl_api_vxlan_gpe_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1931
format_function_t format_ip4_address
Definition: format.h:73
static void * vl_api_ipfix_classify_stream_dump_t_print(vl_api_ipfix_classify_stream_dump_t *mp, void *handle)
Definition: custom_dump.c:2409
static void * vl_api_feature_gso_enable_disable_t_print(vl_api_feature_gso_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:3293
u8 * vl_api_from_api_to_vec(vl_api_string_t *astr)
Definition: api_shared.c:1137
static void * vl_api_lisp_rloc_probe_enable_disable_t_print(vl_api_lisp_rloc_probe_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2898
static __clib_unused void * vl_api_sw_interface_set_rx_placement_t_print(vl_api_sw_interface_set_rx_placement_t *mp, void *handle)
Definition: custom_dump.c:126
u8 * format_ethernet_address(u8 *s, va_list *args)
Definition: format.c:44
Clear interface statistics.
Definition: interface.api:292
static void * vl_api_memclnt_create_t_print(vl_api_memclnt_create_t *mp, void *handle)
Definition: custom_dump.c:1855
Interface set geneve-bypass request.
Definition: geneve.api:68
Add / del table request A table can be added multiple times, but need be deleted only once...
Definition: ip.api:52
vl_api_interface_index_t sw_if_index
Definition: gre.api:59
vl_api_srv6_sid_list_t sids
Definition: sr.api:86
static void * vl_api_l2tpv3_set_lookup_key_t_print(vl_api_l2tpv3_set_lookup_key_t *mp, void *handle)
Definition: custom_dump.c:1440
#define SR_BEHAVIOR_LAST
Definition: sr.h:46
vl_api_interface_index_t sw_if_index
Definition: classify.api:222
vl_api_address_with_prefix_t prefix
Definition: interface.api:228
Classify sessions dump request.
Definition: classify.api:287
u8 * format_vl_api_address_family(u8 *s, va_list *args)
Definition: types.c:26
static u8 * format_policer_action(u8 *s, va_list *va)
Definition: custom_dump.c:2100
static __clib_unused void * vl_api_sw_interface_virtio_pci_dump_t_print(vl_api_sw_interface_virtio_pci_dump_t *mp, void *handle)
Definition: custom_dump.c:647
Enable or disable interface feature gso arc.
Definition: gso.api:26
Set interface source and L4 port-range request.
Definition: ip.api:500
Set/unset output ACL interface.
Definition: classify.api:434
static void * vl_api_ip_table_add_del_t_print(vl_api_ip_table_add_del_t *mp, void *handle)
Definition: custom_dump.c:799
static void * vl_api_mpls_route_add_del_t_print(vl_api_mpls_route_add_del_t *mp, void *handle)
Definition: custom_dump.c:768
vl_api_interface_index_t sw_if_index
Definition: interface.api:574
static void * vl_api_get_next_index_t_print(vl_api_get_next_index_t *mp, void *handle)
Definition: custom_dump.c:2489
u32 feature_bitmap
Definition: l2.api:213
vl_api_address_t local_ip
Definition: ipsec.api:342
add/del application namespace
Definition: session.api:462
static void * vl_api_ip_address_dump_t_print(vl_api_ip_address_dump_t *mp, void *handle)
Definition: custom_dump.c:2008
static void * vl_api_qos_record_enable_disable_t_print(vl_api_qos_record_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:3464
u8 * format_hex_bytes(u8 *s, va_list *va)
Definition: std-formats.c:84
static void * vl_api_policer_dump_t_print(vl_api_policer_dump_t *mp, void *handle)
Definition: custom_dump.c:2202
L2 FIB flush bridge domain entries.
Definition: l2.api:100
add or delete map request itr rlocs
Definition: lisp.api:384
static void * vl_api_cli_t_print(vl_api_cli_t *mp, void *handle)
Definition: custom_dump.c:1829
vl_api_ip_table_t table
Definition: ip.api:57
Delete host-interface.
Definition: af_packet.api:54
Set/unset input ACL interface.
Definition: classify.api:412
static void * vl_api_set_ipfix_classify_stream_t_print(vl_api_set_ipfix_classify_stream_t *mp, void *handle)
Definition: custom_dump.c:2396
unsigned int u32
Definition: types.h:88
static void * vl_api_lisp_eid_table_dump_t_print(vl_api_lisp_eid_table_dump_t *mp, void *handle)
Definition: custom_dump.c:2873
static void * vl_api_sw_interface_set_table_t_print(vl_api_sw_interface_set_table_t *mp, void *handle)
Definition: custom_dump.c:198
static __clib_unused void * vl_api_bd_ip_mac_dump_t_print(vl_api_bd_ip_mac_dump_t *mp, void *handle)
Definition: custom_dump.c:529
static void * vl_api_want_l2_macs_events_t_print(vl_api_want_l2_macs_events_t *mp, void *handle)
Definition: custom_dump.c:1957
vl_api_mac_address_t remote_mac
static void * vl_api_sr_localsid_add_del_t_print(vl_api_sr_localsid_add_del_t *mp, void *handle)
Definition: custom_dump.c:1066
static void * vl_api_ipsec_spd_entry_add_del_t_print(vl_api_ipsec_spd_entry_add_del_t *mp, void *handle)
Definition: custom_dump.c:3032
static void * vl_api_l2fib_flush_int_t_print(vl_api_l2fib_flush_int_t *mp, void *handle)
Definition: custom_dump.c:405
Dump mpls eth tunnel table.
Definition: mpls.api:78
vl_api_interface_index_t sw_if_index
Definition: vhost_user.api:85
static void * vl_api_sw_interface_set_unnumbered_t_print(vl_api_sw_interface_set_unnumbered_t *mp, void *handle)
Definition: custom_dump.c:896
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Definition: ip_types_api.c:161
static void * vl_api_tap_delete_v2_t_print(vl_api_tap_delete_v2_t *mp, void *handle)
Definition: custom_dump.c:590
static void * vl_api_ip_source_and_port_range_check_add_del_t_print(vl_api_ip_source_and_port_range_check_add_del_t *mp, void *handle)
Definition: custom_dump.c:2544
Dump l2 fib (aka bridge domain) table.
Definition: l2.api:68
vl_api_if_status_flags_t flags
Definition: interface.api:92
vl_api_address_family_t ip_version
Configure IP source and L4 port-range check.
Definition: ip.api:481
u8 * format_qos_source(u8 *s, va_list *args)
format/unformat QoS source types
Definition: qos_types.c:27
IP table flush Flush a table of all routes.
Definition: ip.api:116
vl_api_fib_path_type_t type
Definition: fib_types.api:123
vl_api_interface_index_t parent_if_index
IP table replace end.
Definition: ip.api:103
vl_api_ip_dscp_t dscp
Definition: dhcp.api:163
static void * vl_api_sw_interface_set_vxlan_gbp_bypass_t_print(vl_api_sw_interface_set_vxlan_gbp_bypass_t *mp, void *handle)
Definition: custom_dump.c:1572
IPsec: Add/delete Security Association Database entry.
Definition: ipsec.api:188
Set interface L2 flags (such as L2_LEARN, L2_FWD, L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM bits)...
Definition: l2.api:207
u8 * format_vl_api_prefix(u8 *s, va_list *args)
Definition: types.c:87
static void * vl_api_gpe_add_del_fwd_entry_t_print(vl_api_gpe_add_del_fwd_entry_t *mp, void *handle)
Definition: custom_dump.c:2752
L2 FIB flush all entries.
Definition: l2.api:89
L2 fib clear table request, clear all mac entries in the l2 fib.
Definition: l2.api:79
vl_api_ip_route_t route
Definition: ip.api:164
vl_api_interface_index_t sw_if_index
Definition: classify.api:438
vl_api_address_t our_address
Definition: l2tp.api:39
Enable/Disable span to mirror traffic from one interface to another.
Definition: span.api:27
vl_api_mac_address_t mac_address
Definition: virtio.api:39
static void * vl_api_pg_create_interface_t_print(vl_api_pg_create_interface_t *mp, void *handle)
Definition: custom_dump.c:2501
vl_api_interface_index_t sw_if_index
Definition: l2tp.api:94
static void * vl_api_sw_interface_set_vpath_t_print(vl_api_sw_interface_set_vpath_t *mp, void *handle)
Definition: custom_dump.c:231
static void * vl_api_sw_interface_rx_placement_dump_t_print(vl_api_sw_interface_rx_placement_dump_t *mp, void *handle)
Definition: custom_dump.c:143
static void * vl_api_sw_interface_set_lldp_t_print(vl_api_sw_interface_set_lldp_t *mp, void *handle)
Definition: custom_dump.c:3389
vl_api_address_t local_address
Definition: geneve.api:27
vl_api_interface_index_t sw_if_index
Definition: interface.api:296
static void * vl_api_af_packet_dump_t_print(vl_api_af_packet_dump_t *mp, void *handle)
Definition: custom_dump.c:2090
#define SR_BEHAVIOR_END
Definition: sr.h:37
set LISP map-request mode.
Definition: lisp.api:281
static void * vl_api_ip_table_replace_begin_t_print(vl_api_ip_table_replace_begin_t *mp, void *handle)
Definition: custom_dump.c:974
IPsec: Add/delete Security Policy Database.
Definition: ipsec.api:29
static void * vl_api_gre_tunnel_add_del_t_print(vl_api_gre_tunnel_add_del_t *mp, void *handle)
Definition: custom_dump.c:1632
u8 system_name[256]
Definition: lldp.api:30
static void * vl_api_geneve_add_del_tunnel_t_print(vl_api_geneve_add_del_tunnel_t *mp, void *handle)
Definition: custom_dump.c:1586
bool enable[default=true]
Definition: qos.api:113
u32 bd_id
Definition: gbp.api:175
unsigned short u16
Definition: types.h:57
vl_api_interface_index_t sw_if_index
Definition: bond.api:104
static void * vl_api_sw_interface_span_dump_t_print(vl_api_sw_interface_span_dump_t *mp, void *handle)
Definition: custom_dump.c:2475
vl_api_interface_index_t sw_if_index
Definition: mpls.api:82
static void * vl_api_ipsec_sad_entry_add_del_t_print(vl_api_ipsec_sad_entry_add_del_t *mp, void *handle)
Definition: custom_dump.c:3097
Request for LISP adjacencies.
Definition: lisp.api:588
Set/unset l2 classification tables for an interface request.
Definition: classify.api:389
u32 opaque_index[default=0xffffffff]
Definition: classify.api:126
vl_api_interface_index_t sw_if_index
Definition: interface.api:282
bool is_add[default=true]
Definition: ip.api:453
vl_api_flow_classify_table_t type
Definition: classify.api:350
static void * vl_api_l2fib_flush_all_t_print(vl_api_l2fib_flush_all_t *mp, void *handle)
Definition: custom_dump.c:382
u8 stream_name[stream_name_length]
Definition: pg.api:81
vl_api_interface_index_t sw_if_index
Definition: ip.api:452
add or delete lisp eid-table
Definition: lisp.api:93
static void * vl_api_gre_tunnel_dump_t_print(vl_api_gre_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1659
MPLS Route Add / del route.
Definition: mpls.api:160
vl_api_interface_index_t sw_if_index
Definition: feature.api:35
static void * vl_api_classify_add_del_session_t_print(vl_api_classify_add_del_session_t *mp, void *handle)
Definition: custom_dump.c:1306
static void * vl_api_bond_delete_t_print(vl_api_bond_delete_t *mp, void *handle)
Definition: custom_dump.c:680
static void * vl_api_p2p_ethernet_add_t_print(vl_api_p2p_ethernet_add_t *mp, void *handle)
Definition: custom_dump.c:3335
static void * vl_api_sw_interface_bond_dump_t_print(vl_api_sw_interface_bond_dump_t *mp, void *handle)
Definition: custom_dump.c:730
static __clib_unused void * vl_api_ip_container_proxy_add_del_t_print(vl_api_ip_container_proxy_add_del_t *mp, void *handle)
Definition: custom_dump.c:3453
u32 vl_api_string_len(vl_api_string_t *astr)
Definition: api_shared.c:1120
static void * vl_api_cop_whitelist_enable_disable_t_print(vl_api_cop_whitelist_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2046
static void * vl_api_ip_route_dump_t_print(vl_api_ip_route_dump_t *mp, void *handle)
Definition: custom_dump.c:2310
#define SR_BEHAVIOR_DX4
Definition: sr.h:43
Get list of flow classify interfaces and tables.
Definition: classify.api:347
static void * vl_api_af_packet_delete_t_print(vl_api_af_packet_delete_t *mp, void *handle)
Definition: custom_dump.c:2079
vl_api_address_t dst
Definition: gre.api:61
static void * vl_api_pg_enable_disable_t_print(vl_api_pg_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2530
Set or delete one or all ip addresses on a specified interface.
Definition: interface.api:220
Enable or Disable MPLS on and interface.
Definition: mpls.api:205
vl_api_interface_index_t sw_if_index
Definition: interface.api:242
vl_api_mpls_route_t mr_route
Definition: mpls.api:166
vl_api_ip4_address_with_prefix_t host_ip4_prefix
Definition: tapv2.api:78
Enable/Disable QoS recording The QoS bits from the packet at the specified input layer are copied int...
Definition: qos.api:109
vl_api_address_t collector_address
u32 miss_next_index[default=0xffffffff]
Definition: classify.api:57
u32 next_table_index[default=0xffffffff]
Definition: classify.api:56
Dump bond interfaces request.
Definition: bond.api:133
IOAM enable : Enable in-band OAM.
Definition: ip.api:549
static void * vl_api_af_packet_create_t_print(vl_api_af_packet_create_t *mp, void *handle)
Definition: custom_dump.c:2064
static void * vl_api_sw_interface_event_t_print(vl_api_sw_interface_event_t *mp, void *handle)
Definition: custom_dump.c:157
Call from VLIB_INIT_FUNCTION to set the Linux kernel inject node name.
vl_api_address_t last_address
Definition: tcp.api:43
Classify table info.
Definition: classify.api:248
u8 len
Definition: ip_types.api:91
API main structure, used by both vpp and binary API clients.
Definition: api_common.h:225
format_function_t format_ip46_address
Definition: ip46_address.h:50
Initialize a new bond interface with the given paramters.
Definition: bond.api:100
vl_api_interface_index_t sw_if_index
Definition: interface.api:486
static void * vl_api_modify_vhost_user_if_t_print(vl_api_modify_vhost_user_if_t *mp, void *handle)
Definition: custom_dump.c:1737
static void * vl_api_classify_table_by_interface_t_print(vl_api_classify_table_by_interface_t *mp, void *handle)
Definition: custom_dump.c:2330
static void * vl_api_show_version_t_print(vl_api_show_version_t *mp, void *handle)
Definition: custom_dump.c:1875
static void * vl_api_set_ip_flow_hash_t_print(vl_api_set_ip_flow_hash_t *mp, void *handle)
Definition: custom_dump.c:1015
IPsec: Add/delete SPD from interface.
Definition: ipsec.api:47
Offload vxlan rx request.
Definition: vxlan.api:97
vl_api_srv6_sid_t localsid
Definition: sr.api:52
IPFIX classify stream configure request.
static void * vl_api_lisp_locator_dump_t_print(vl_api_lisp_locator_dump_t *mp, void *handle)
Definition: custom_dump.c:2838
PacketGenerator create interface request.
Definition: pg.api:30
vl_api_interface_index_t sw_if_index
Definition: geneve.api:72
static void * vl_api_lisp_add_del_map_resolver_t_print(vl_api_lisp_add_del_map_resolver_t *mp, void *handle)
Definition: custom_dump.c:2762
Set the ip flow hash config for a fib request.
Definition: ip.api:206
static void * vl_api_create_loopback_t_print(vl_api_create_loopback_t *mp, void *handle)
Definition: custom_dump.c:75
u32 flags
Definition: vhost_user.h:141
enable or disable LISP feature
Definition: lisp.api:144
format_function_t format_ip6_address
Definition: format.h:91
vl_api_mac_address_t remote_mac
Create host-interface.
Definition: af_packet.api:28
static void * vl_api_policer_add_del_t_print(vl_api_policer_add_del_t *mp, void *handle)
Definition: custom_dump.c:2127
vl_api_gre_tunnel_t tunnel
Definition: gre.api:69
static void * vl_api_gpe_enable_disable_t_print(vl_api_gpe_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2780
cop: enable/disable junk filtration features on an interface
Definition: cop.api:27
#define vec_free(V)
Free vector&#39;s memory (no header).
Definition: vec.h:342
vl_api_ipsec_sad_entry_t entry
Definition: ipsec.api:193
static void * vl_api_cop_interface_enable_disable_t_print(vl_api_cop_interface_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2031
Set/unset the classification table for an interface request.
Definition: classify.api:372
vl_api_tap_flags_t tap_flags
Definition: tapv2.api:85
Initialize a new bond interface with the given paramters.
Definition: bond.api:56
vl_api_interface_index_t sw_if_index
Definition: interface.api:53
static void * vl_api_l2_interface_pbb_tag_rewrite_t_print(vl_api_l2_interface_pbb_tag_rewrite_t *mp, void *handle)
Definition: custom_dump.c:3144
static void * vl_api_bond_detach_slave_t_print(vl_api_bond_detach_slave_t *mp, void *handle)
Definition: custom_dump.c:719
static void * vl_api_policer_classify_dump_t_print(vl_api_policer_classify_dump_t *mp, void *handle)
Definition: custom_dump.c:2233
static void * vl_api_lisp_map_register_enable_disable_t_print(vl_api_lisp_map_register_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2912
SPAN dump request.
Definition: span.api:41
Create or delete a VXLAN tunnel.
Definition: vxlan.api:31
#define FINISH
Definition: custom_dump.c:67
static void * vl_api_set_ipfix_exporter_t_print(vl_api_set_ipfix_exporter_t *mp, void *handle)
Definition: custom_dump.c:2366
Feature path enable/disable request.
Definition: feature.api:32
static void * vl_api_ip_source_and_port_range_check_interface_add_del_t_print(vl_api_ip_source_and_port_range_check_interface_add_del_t *mp, void *handle)
Definition: custom_dump.c:2566
IPv6 SR steering add/del.
Definition: sr.api:164
add or delete map-resolver
Definition: lisp.api:130
Initialize a new tap interface with the given parameters.
Definition: tapv2.api:63
Set/unset flow classify interface.
Definition: classify.api:326
Request all or filtered subset of sw_interface_details.
Definition: interface.api:203
static void * vl_api_sr_policy_del_t_print(vl_api_sr_policy_del_t *mp, void *handle)
Definition: custom_dump.c:1263
static void * vl_api_lisp_add_del_local_eid_t_print(vl_api_lisp_add_del_local_eid_t *mp, void *handle)
Definition: custom_dump.c:2729
static void * vl_api_hw_interface_set_mtu_t_print(vl_api_hw_interface_set_mtu_t *mp, void *handle)
Definition: custom_dump.c:3323
Delete sub interface request.
Definition: interface.api:507
#define ARRAY_LEN(x)
Definition: clib.h:62
vl_api_interface_index_t sw_if_index
Definition: bond.api:129
void vl_msg_api_custom_dump_configure(api_main_t *am)
Definition: custom_dump.c:3700
Request for map lisp locator status.
Definition: lisp.api:421
static void * vl_api_lldp_config_t_print(vl_api_lldp_config_t *mp, void *handle)
Definition: custom_dump.c:3418
Delete loopback interface request.
Definition: interface.api:570
Dump bridge domain IP to MAC entries.
Definition: l2.api:529
vl_api_interface_index_t sw_if_index
Definition: vxlan_gbp.api:72
static void * vl_api_ipsec_tunnel_if_add_del_t_print(vl_api_ipsec_tunnel_if_add_del_t *mp, void *handle)
Definition: custom_dump.c:2952
vl_api_interface_index_t sw_if_index
Definition: tapv2.api:116
vhost-user interface modify request
Definition: vhost_user.api:66
u32 segments[n_segments]
Definition: sr_mpls.api:34
Register for interface events.
Definition: interface.api:102
vl_api_classify_action_t action[default=0]
Definition: classify.api:128
Set L2 XConnect between two interfaces request.
Definition: l2.api:433
bond detach slave
Definition: bond.api:125
static void * vl_api_tap_create_v2_t_print(vl_api_tap_create_v2_t *mp, void *handle)
Definition: custom_dump.c:539
vl_api_interface_index_t sw_if_index
Definition: mpls.api:209
IP table replace being.
Definition: ip.api:88
static void * vl_api_ipfix_classify_table_add_del_t_print(vl_api_ipfix_classify_table_add_del_t *mp, void *handle)
Definition: custom_dump.c:2419
static void * vl_api_ip_route_add_del_t_print(vl_api_ip_route_add_del_t *mp, void *handle)
Definition: custom_dump.c:751
static void * vl_api_ipsec_interface_add_del_spd_t_print(vl_api_ipsec_interface_add_del_spd_t *mp, void *handle)
Definition: custom_dump.c:3076
vl_api_interface_index_t sw_if_index
Definition: classify.api:416
vl_api_mpls_table_t mt_table
Definition: mpls.api:112
vl_api_interface_index_t sw_if_index
Definition: classify.api:377
static void * vl_api_ioam_disable_t_print(vl_api_ioam_disable_t *mp, void *handle)
Definition: custom_dump.c:3264
static void * vl_api_create_subif_t_print(vl_api_create_subif_t *mp, void *handle)
Definition: custom_dump.c:939
vl_api_interface_index_t sw_if_index
Definition: gre.api:83
Request for eid table summary status.
Definition: lisp.api:540
vl_api_bond_lb_algo_t lb
Definition: bond.api:64
enable/disable LISP map-register
Definition: lisp.api:245
vl_api_qos_record_t record
Definition: qos.api:114
Request for locator_set summary status.
Definition: lisp.api:469
Get list of policer classify interfaces and tables.
Definition: classify.api:170
Reply for lisp_add_del_map_request_itr_rlocs.
Definition: lisp.api:404
static void * vl_api_vxlan_add_del_tunnel_t_print(vl_api_vxlan_add_del_tunnel_t *mp, void *handle)
Definition: custom_dump.c:1478
static void * vl_api_create_loopback_instance_t_print(vl_api_create_loopback_instance_t *mp, void *handle)
Definition: custom_dump.c:86
vl_api_interface_index_t sw_if_index
Definition: classify.api:149
Register to receive L2 MAC events for learned and aged MAC.
Definition: l2.api:151
vl_api_policer_classify_table_t type
Definition: classify.api:174
static void * vl_api_sw_interface_set_geneve_bypass_t_print(vl_api_sw_interface_set_geneve_bypass_t *mp, void *handle)
Definition: custom_dump.c:268
static void * vl_api_set_punt_t_print(vl_api_set_punt_t *mp, void *handle)
Definition: custom_dump.c:3183
#define foreach_create_subif_flag
Definition: custom_dump.c:928
IPv6 SR policy deletion.
Definition: sr.api:119
Delete bond interface.
Definition: bond.api:85
static void * vl_api_sw_interface_tap_v2_dump_t_print(vl_api_sw_interface_tap_v2_dump_t *mp, void *handle)
Definition: custom_dump.c:601
Set the next node for a given node request.
Definition: vpe.api:146
vl_api_interface_index_t sw_if_index
Definition: vxlan_gbp.api:92
vl_api_interface_index_t sw_if_index
Definition: interface.api:404
Query relative index via node names.
Definition: vpe.api:268
static void * vl_api_classify_session_dump_t_print(vl_api_classify_session_dump_t *mp, void *handle)
Definition: custom_dump.c:2354
show version
Definition: vpe.api:170
add or delete locator_set
Definition: lisp.api:33
MPLS SR policy add.
Definition: sr_mpls.api:26
string host_namespace[64]
Definition: tapv2.api:87
static void * vl_api_get_first_msg_id_t_print(vl_api_get_first_msg_id_t *mp, void *handle)
Definition: custom_dump.c:3232
Punt traffic to the host.
Definition: punt.api:86
static void * vl_api_gpe_add_del_iface_t_print(vl_api_gpe_add_del_iface_t *mp, void *handle)
Definition: custom_dump.c:2605
#define foreach_custom_print_function
Definition: custom_dump.c:3509
vl_api_interface_index_t sw_if_index
Definition: interface.api:453
static void * vl_api_ip_table_replace_end_t_print(vl_api_ip_table_replace_end_t *mp, void *handle)
Definition: custom_dump.c:1001
vl_api_interface_index_t sw_if_index
Definition: classify.api:329
static void * vl_api_lisp_add_del_map_request_itr_rlocs_t_print(vl_api_lisp_add_del_map_request_itr_rlocs_t *mp, void *handle)
Definition: custom_dump.c:2699
i16 current_data_offset[default=0]
Definition: classify.api:59
static void * vl_api_sw_interface_add_del_address_t_print(vl_api_sw_interface_add_del_address_t *mp, void *handle)
Definition: custom_dump.c:182
static void * vl_api_sr_policy_mod_t_print(vl_api_sr_policy_mod_t *mp, void *handle)
Definition: custom_dump.c:1224
Classify table ids by interface index request.
Definition: classify.api:218
Interface set vxlan-bypass request.
Definition: vxlan_gbp.api:88
#define SR_BEHAVIOR_DX2
Definition: sr.h:41
Interface Event generated by want_interface_events.
Definition: interface.api:87
vl_api_address_t src_address
MPLS SR policy deletion.
Definition: sr_mpls.api:66
IPv6 SR policy add.
Definition: sr.api:77
Configure TCP source addresses, for active-open TCP sessions.
Definition: tcp.api:38
static void * vl_api_bridge_domain_set_mac_age_t_print(vl_api_bridge_domain_set_mac_age_t *mp, void *handle)
Definition: custom_dump.c:354
vl_api_interface_index_t sw_if_index
Definition: interface.api:39
vl_api_ipsec_spd_entry_t entry
Definition: ipsec.api:123
static void * vl_api_classify_set_interface_ip_table_t_print(vl_api_classify_set_interface_ip_table_t *mp, void *handle)
Definition: custom_dump.c:1340
vl_api_punt_t punt
Definition: punt.api:90
static void * vl_api_classify_table_ids_t_print(vl_api_classify_table_ids_t *mp, void *handle)
Definition: custom_dump.c:2320
u8 num_rx_queues[default=1]
Definition: tapv2.api:70
Interface bridge mode request.
Definition: l2.api:467
static void * vl_api_l2_interface_efp_filter_t_print(vl_api_l2_interface_efp_filter_t *mp, void *handle)
Definition: custom_dump.c:1681
Create loopback interface instance request.
Definition: interface.api:544
static void * vl_api_bd_ip_mac_add_del_t_print(vl_api_bd_ip_mac_add_del_t *mp, void *handle)
Definition: custom_dump.c:501
L2 FIB flush interface entries.
Definition: l2.api:112
vl_api_interface_index_t sw_if_index
Definition: l2tp.api:64
vl_api_mac_address_t host_mac_addr
Definition: tapv2.api:76
u8 action
Definition: l2.api:173
vl_api_interface_index_t bond_sw_if_index
Definition: bond.api:105
static ip46_address_t to_ip46(u32 is_ipv6, u8 *buf)
Definition: ip46_address.h:137
vl_api_pci_address_t pci_addr
Definition: virtio.api:37
static void * vl_api_pg_capture_t_print(vl_api_pg_capture_t *mp, void *handle)
Definition: custom_dump.c:2514
vl_api_bd_flags_t flags
Definition: l2.api:350
Set interface physical MTU.
Definition: interface.api:49
vl_api_interface_index_t sw_if_index
Definition: vhost_user.api:70
add or delete GPE tunnel
Definition: lisp_gpe.api:48
static void * vl_api_delete_vhost_user_if_t_print(vl_api_delete_vhost_user_if_t *mp, void *handle)
Definition: custom_dump.c:1756
u32 interface_id
Definition: pg.api:62
add or delete locator for locator_set
Definition: lisp.api:64
Configure IPFIX exporter process request.
static void * vl_api_lisp_add_del_remote_mapping_t_print(vl_api_lisp_add_del_remote_mapping_t *mp, void *handle)
Definition: custom_dump.c:2653
#define foreach_no_print_function
Definition: custom_dump.c:3479
L2 interface ethernet flow point filtering enable/disable request.
Definition: l2.api:542
static void * vl_api_sw_interface_set_l2_bridge_t_print(vl_api_sw_interface_set_l2_bridge_t *mp, void *handle)
Definition: custom_dump.c:307
static void * vl_api_sw_interface_set_vxlan_bypass_t_print(vl_api_sw_interface_set_vxlan_bypass_t *mp, void *handle)
Definition: custom_dump.c:248
static void * vl_api_ipfix_classify_table_dump_t_print(vl_api_ipfix_classify_table_dump_t *mp, void *handle)
Definition: custom_dump.c:2433
Interface set LLDP request.
Definition: lldp.api:45
Delete tap interface.
Definition: tapv2.api:112
static void * vl_api_ip_table_flush_t_print(vl_api_ip_table_flush_t *mp, void *handle)
Definition: custom_dump.c:988
u8 is_add
Definition: ipsec.api:192
u32 hit_next_index[default=0xffffffff]
Definition: classify.api:125
Create loopback interface request.
Definition: interface.api:518
Set unnumbered interface add / del request.
Definition: interface.api:278
add or delete remote static mapping
Definition: lisp.api:335
Segment Routing MPLS data structures definitions.
L2 interface vlan tag rewrite configure request.
Definition: l2.api:374
static u8 * format_bond_mode(u8 *s, va_list *args)
Definition: node.h:444
vl_api_interface_index_t sw_if_index
Definition: interface.api:224
Create a new subinterface with the given vlan id.
Definition: interface.api:482
vl_api_ip_table_t table
Definition: ip.api:92
static void * vl_api_mpls_table_dump_t_print(vl_api_mpls_table_dump_t *mp, void *handle)
Definition: custom_dump.c:2280
bool mt_is_add[default=true]
Definition: mpls.api:111
static void * vl_api_mpls_table_add_del_t_print(vl_api_mpls_table_add_del_t *mp, void *handle)
Definition: custom_dump.c:817
L2 interface patch add / del request.
Definition: l2.api:417
vl_api_interface_index_t sw_if_index
Definition: geneve.api:46
vl_api_interface_index_t sw_if_index
Definition: gso.api:30
Dump IP routes from a table.
Definition: ip.api:177
dump the rx queue placement of interface(s)
Definition: interface.api:416
u8 * vl_api_from_api_string(vl_api_string_t *astr)
Definition: api_shared.c:1114
Interface set vpath request.
Definition: l2.api:556
static void * vl_api_ipfix_exporter_dump_t_print(vl_api_ipfix_exporter_dump_t *mp, void *handle)
Definition: custom_dump.c:2386
configure global parameter for LLDP
Definition: lldp.api:26
Add/del policer.
Definition: policer.api:38
Segment Routing data structures definitions.
static void * vl_api_mpls_tunnel_dump_t_print(vl_api_mpls_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:2269
L2 interface pbb tag rewrite configure request.
Definition: l2.api:397
static void * vl_api_l2_fib_table_dump_t_print(vl_api_l2_fib_table_dump_t *mp, void *handle)
Definition: custom_dump.c:1796
vl_api_if_status_flags_t flags
Definition: interface.api:40
static void * vl_api_ipsec_spd_add_del_t_print(vl_api_ipsec_spd_add_del_t *mp, void *handle)
Definition: custom_dump.c:3087
IPv6 SR policy modification.
Definition: sr.api:100
static void * vl_api_sw_interface_dump_t_print(vl_api_sw_interface_dump_t *mp, void *handle)
Definition: custom_dump.c:1777
u32 sw_if_index
Definition: l2.api:211
#define vec_foreach(var, vec)
Vector iterator.
Set bridge flags request.
Definition: l2.api:344
unsigned long long u32x4
Definition: ixge.c:28
IPFIX classify stream dump request.
static void * vl_api_vxlan_gbp_tunnel_add_del_t_print(vl_api_vxlan_gbp_tunnel_add_del_t *mp, void *handle)
Definition: custom_dump.c:1538
vl_api_interface_index_t sw_if_index
Definition: cop.api:51
static u8 * format_vl_api_prefix_t(u8 *s, va_list *args)
Definition: ip_format_fns.h:77
static u8 * format_bond_load_balance(u8 *s, va_list *args)
Definition: node.h:476
vl_api_bd_ip_mac_t entry
Definition: l2.api:499
vl_api_interface_index_t sw_if_index
Definition: classify.api:393
vl_api_ip_table_t table
Definition: ip.api:107
vhost-user interface delete request
Definition: vhost_user.api:81
#define SR_STEER_L2
Definition: sr.h:48
vl_api_mpls_tunnel_t mt_tunnel
Definition: mpls.api:57
static void * vl_api_l2tpv3_create_tunnel_t_print(vl_api_l2tpv3_create_tunnel_t *mp, void *handle)
Definition: custom_dump.c:1384
Set / clear software interface tag.
Definition: interface.api:306
string host_if_name[64]
Definition: tapv2.api:89
Dump MPLS fib table.
Definition: mpls.api:118
static void * vl_api_tcp_configure_src_addresses_t_print(vl_api_tcp_configure_src_addresses_t *mp, void *handle)
Definition: custom_dump.c:3359
l2tpv3 tunnel interface create request
Definition: l2tp.api:34
IPv6 SR LocalSID add/del request.
Definition: sr.api:47
static void * vl_api_sw_interface_span_enable_disable_t_print(vl_api_sw_interface_span_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2443
#define foreach_custom_print_no_arg_function
Definition: custom_dump.c:3491
Associate the specified interface with a fib table.
Definition: interface.api:238
static void * vl_api_feature_enable_disable_t_print(vl_api_feature_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:3278
static void * vl_api_app_namespace_add_del_t_print(vl_api_app_namespace_add_del_t *mp, void *handle)
Definition: custom_dump.c:3375
Flush bridge domain IP to MAC entries.
Definition: l2.api:506
vl_api_interface_index_t sw_if_index
Definition: bond.api:203
Add or delete IPsec tunnel interface.
Definition: ipsec.api:336
IPFIX add or delete classifier table request.
string host_bridge[64]
Definition: tapv2.api:91
format_function_t format_vlib_pci_addr
Definition: pci.h:324
enable or disable gpe protocol
Definition: lisp_gpe.api:77
static void * vl_api_policer_classify_set_interface_t_print(vl_api_policer_classify_set_interface_t *mp, void *handle)
Definition: custom_dump.c:2214
static void * vl_api_vxlan_tunnel_dump_t_print(vl_api_vxlan_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1526
Dump IP all fib tables.
Definition: ip.api:64
#define SR_BEHAVIOR_DX6
Definition: sr.h:42
vl_api_interface_index_t sw_if_index
Definition: interface.api:311
static void * vl_api_sw_interface_vhost_user_dump_t_print(vl_api_sw_interface_vhost_user_dump_t *mp, void *handle)
Definition: custom_dump.c:1767
static void * vl_api_classify_table_info_t_print(vl_api_classify_table_info_t *mp, void *handle)
Definition: custom_dump.c:2342
vl_api_ip6_address_with_prefix_t host_ip6_prefix
Definition: tapv2.api:80
L2 bridge domain add or delete request.
Definition: l2.api:255
show_threads display the information about vpp threads running on system along with their process id...
Definition: vpe.api:198