FD.io VPP  v20.05.1-6-gf53edbc3b
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  if ((mp->tap_flags) & 0x4)
587  s = format (s, "persist ");
588  if ((mp->tap_flags) & 0x8)
589  s = format (s, "attach ");
590  if ((mp->tap_flags) & 0x16)
591  s = format (s, "tun ");
592  if ((mp->tap_flags) & 0x32)
593  s = format (s, "gro-coalesce-enabled ");
594  FINISH;
595 }
596 
597 static void *vl_api_tap_delete_v2_t_print
598  (vl_api_tap_delete_v2_t * mp, void *handle)
599 {
600  u8 *s;
601 
602  s = format (0, "SCRIPT: tap_delete_v2 ");
603  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
604 
605  FINISH;
606 }
607 
610 {
611  u8 *s;
612 
613  s = format (0, "SCRIPT: sw_interface_tap_v2_dump ");
614 
615  FINISH;
616 }
617 
618 __clib_unused
620  (vl_api_virtio_pci_create_t * mp, void *handle)
621 {
622  u8 *s;
623  u8 null_mac[6];
624 
625  clib_memset (null_mac, 0, sizeof (null_mac));
626 
627  s = format (0, "SCRIPT: virtio_pci_create ");
628  s = format (s, "pci_addr %U ", format_vlib_pci_addr, (mp->pci_addr));
629  if (memcmp (mp->mac_address, null_mac, 6))
630  s = format (s, "mac-address %U ",
632  if (mp->features)
633  s = format (s, "features 0x%llx ", clib_net_to_host_u64 (mp->features));
634  if (mp->gso_enabled)
635  s = format (s, "gso-enabled ");
636  if (mp->checksum_offload_enabled)
637  s = format (s, "checksum_offload_enabled");
638  FINISH;
639 }
640 
641 __clib_unused
643  (vl_api_virtio_pci_delete_t * mp, void *handle)
644 {
645  u8 *s;
646 
647  s = format (0, "SCRIPT: virtio_pci_delete ");
648  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
649 
650  FINISH;
651 }
652 
653 __clib_unused
656 {
657  u8 *s;
658 
659  s = format (0, "SCRIPT: sw_interface_virtio_pci_dump ");
660 
661  FINISH;
662 }
663 
664 static void *vl_api_bond_create_t_print
665  (vl_api_bond_create_t * mp, void *handle)
666 {
667  u8 *s;
668  u8 null_mac[6];
669 
670  clib_memset (null_mac, 0, sizeof (null_mac));
671 
672  s = format (0, "SCRIPT: bond_create ");
673  if (memcmp (mp->mac_address, null_mac, 6))
674  s = format (s, "mac-address %U ",
676  if (mp->mode)
677  s = format (s, "mode %U ", format_bond_mode, ntohl (mp->mode));
678  if (mp->lb)
679  s = format (s, "lb %U ", format_bond_load_balance, ntohl (mp->lb));
680  if (mp->numa_only)
681  s = format (s, "numa-only is set in lacp mode");
682  if (mp->id != ~0)
683  s = format (s, "id %u ", (mp->id));
684  FINISH;
685 }
686 
687 static void *vl_api_bond_delete_t_print
688  (vl_api_bond_delete_t * mp, void *handle)
689 {
690  u8 *s;
691 
692  s = format (0, "SCRIPT: bond_delete ");
693  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
694 
695  FINISH;
696 }
697 
698 static void *vl_api_bond_enslave_t_print
699  (vl_api_bond_enslave_t * mp, void *handle)
700 {
701  u8 *s;
702 
703  s = format (0, "SCRIPT: bond_enslave ");
704  s = format (s, "bond_sw_if_index %u ", (mp->bond_sw_if_index));
705  s = format (s, "sw_if_index %u ", (mp->sw_if_index));
706  if (mp->is_passive)
707  s = format (s, "passive ");
708  if (mp->is_long_timeout)
709  s = format (s, "long-timeout ");
710 
711  FINISH;
712 }
713 
716 {
717  u8 *s;
718 
719  s = format (0, "SCRIPT: sw_interface_set_bond_weight ");
720  s = format (s, "sw_if_index %u ", ntohl (mp->sw_if_index));
721  s = format (s, "weight %u ", ntohl (mp->weight));
722 
723  FINISH;
724 }
725 
727  (vl_api_bond_detach_slave_t * mp, void *handle)
728 {
729  u8 *s;
730 
731  s = format (0, "SCRIPT: bond_detach_slave ");
732  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
733 
734  FINISH;
735 }
736 
738  (vl_api_sw_interface_bond_dump_t * mp, void *handle)
739 {
740  u8 *s;
741 
742  s = format (0, "SCRIPT: sw_interface_bond_dump ");
743 
744  FINISH;
745 }
746 
748  (vl_api_sw_interface_slave_dump_t * mp, void *handle)
749 {
750  u8 *s;
751 
752  s = format (0, "SCRIPT: sw_interface_slave_dump ");
753  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
754 
755  FINISH;
756 }
757 
759  (vl_api_ip_route_add_del_t * mp, void *handle)
760 {
761  u8 *s, p;
762 
763  s = format (0, "SCRIPT: ip_route_add_del ");
764  if (mp->is_add == 0)
765  s = format (s, "del ");
766 
767  s = format (s, "%U", format_vl_api_prefix, &mp->route.prefix);
768 
769  for (p = 0; p < mp->route.n_paths; p++)
770  s = format (s, " [%U]", format_vl_api_fib_path, &mp->route.paths[p]);
771 
772  FINISH;
773 }
774 
776  (vl_api_mpls_route_add_del_t * mp, void *handle)
777 {
778  u8 *s, p;
779 
780  s = format (0, "SCRIPT: mpls_route_add_del ");
781 
782  if (mp->mr_is_add)
783  s = format (s, "add ");
784  else
785  s = format (s, "del ");
786 
787  s = format (s, "table %d ", (mp->mr_route.mr_table_id));
788  s = format (s, "%d ", (mp->mr_route.mr_label));
789 
790  if (mp->mr_route.mr_eos)
791  s = format (s, "eos ");
792  else
793  s = format (s, "non-eos ");
794 
795  if (mp->mr_route.mr_is_multicast)
796  s = format (s, "multicast ");
797 
798  for (p = 0; p < mp->mr_route.mr_n_paths; p++)
799  s =
800  format (s, " [%U]", format_vl_api_fib_path, &mp->mr_route.mr_paths[p]);
801 
802 
803  FINISH;
804 }
805 
807  (vl_api_ip_table_add_del_t * mp, void *handle)
808 {
809  u8 *s;
810 
811  s = format (0, "SCRIPT: ip_table_add_del ");
812  if (mp->is_add)
813  s = format (s, "add ");
814  else
815  s = format (s, "del ");
816  if (mp->table.is_ip6)
817  s = format (s, "ip6 ");
818  s = format (s, "table %d ", (mp->table.table_id));
819  s = format (s, "%s ", mp->table.name);
820 
821  FINISH;
822 }
823 
825  (vl_api_mpls_table_add_del_t * mp, void *handle)
826 {
827  u8 *s;
828 
829  s = format (0, "SCRIPT: mpls_table_add_del ");
830  if (mp->mt_is_add)
831  s = format (s, "add ");
832  else
833  s = format (s, "del ");
834  s = format (s, "table %d ", (mp->mt_table.mt_table_id));
835 
836  FINISH;
837 }
838 
840  (vl_api_mpls_tunnel_add_del_t * mp, void *handle)
841 {
842  u8 *s, p;
843 
844  s = format (0, "SCRIPT: mpls_tunnel_add_del ");
845 
846  if (mp->mt_is_add == 0)
847  s = format (s, "del sw_if_index %d ", (mp->mt_tunnel.mt_sw_if_index));
848  else
849  s = format (s, "sw_if_index %d ", (mp->mt_tunnel.mt_sw_if_index));
850 
851 
852  if (mp->mt_tunnel.mt_l2_only)
853  s = format (s, "l2-only ");
854  if (mp->mt_tunnel.mt_is_multicast)
855  s = format (s, "multicast ");
856  if (mp->mt_tunnel.mt_tunnel_index)
857  s = format (s, "tunnel-index ");
858 
859  for (p = 0; p < mp->mt_tunnel.mt_n_paths; p++)
860  s = format (s, " [%U]", format_vl_api_fib_path,
861  &mp->mt_tunnel.mt_paths[p]);
862 
863  FINISH;
864 }
865 
867  (vl_api_sr_mpls_policy_add_t * mp, void *handle)
868 {
869  u8 *s;
870 
871  s = format (0, "SCRIPT: sr_mpls_policy_add ");
872 
873  s = format (s, "bsid %d ", (mp->bsid));
874 
875  if (mp->weight != htonl ((u32) 1))
876  s = format (s, "%d ", (mp->weight));
877 
878  if (mp->is_spray)
879  s = format (s, "spray ");
880 
881  if (mp->n_segments)
882  {
883  int i;
884  for (i = 0; i < mp->n_segments; i++)
885  s = format (s, "next %d ", (mp->segments[i]));
886  }
887 
888  FINISH;
889 }
890 
892  (vl_api_sr_mpls_policy_del_t * mp, void *handle)
893 {
894  u8 *s;
895 
896  s = format (0, "SCRIPT: sr_mpls_policy_del ");
897 
898  s = format (s, "bsid %d ", (mp->bsid));
899 
900  FINISH;
901 }
902 
905 {
906  u8 *s;
907 
908  s = format (0, "SCRIPT: sw_interface_set_unnumbered ");
909 
910  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
911 
912  s = format (s, "unnum_if_index %d ", (mp->unnumbered_sw_if_index));
913 
914  if (mp->is_add == 0)
915  s = format (s, "del ");
916 
917  FINISH;
918 }
919 
921  (vl_api_create_vlan_subif_t * mp, void *handle)
922 {
923  u8 *s;
924 
925  s = format (0, "SCRIPT: create_vlan_subif ");
926 
927  if (mp->sw_if_index)
928  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
929 
930  if (mp->vlan_id)
931  s = format (s, "vlan_id %d ", (mp->vlan_id));
932 
933  FINISH;
934 }
935 
936 #define foreach_create_subif_flag \
937 _(0, "no_tags") \
938 _(1, "one_tag") \
939 _(2, "two_tags") \
940 _(3, "dot1ad") \
941 _(4, "exact_match") \
942 _(5, "default_sub") \
943 _(6, "outer_vlan_id_any") \
944 _(7, "inner_vlan_id_any")
945 
946 static void *vl_api_create_subif_t_print
947  (vl_api_create_subif_t * mp, void *handle)
948 {
949  u8 *s;
950 
951  s = format (0, "SCRIPT: create_subif ");
952 
953  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
954 
955  s = format (s, "sub_id %d ", (mp->sub_id));
956 
957  if (mp->outer_vlan_id)
958  s = format (s, "outer_vlan_id %d ", (mp->outer_vlan_id));
959 
960  if (mp->inner_vlan_id)
961  s = format (s, "inner_vlan_id %d ", (mp->inner_vlan_id));
962 
963 #define _(a,b) if (mp->sub_if_flags & (1 << a)) s = format (s, "%s ", b);
965 #undef _
966 
967  FINISH;
968 }
969 
970 static void *vl_api_delete_subif_t_print
971  (vl_api_delete_subif_t * mp, void *handle)
972 {
973  u8 *s;
974 
975  s = format (0, "SCRIPT: delete_subif ");
976  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
977 
978  FINISH;
979 }
980 
981 static void *
983  void *handle)
984 {
985  u8 *s;
986 
987  s = format (0, "SCRIPT: ip_table_replace_begin ");
988 
989  s = format (s, "v%s-table %d ",
990  mp->table.is_ip6 ? "6" : "4", (mp->table.table_id));
991 
992  FINISH;
993 }
994 
995 static void *
997 {
998  u8 *s;
999 
1000  s = format (0, "SCRIPT: ip_table_flush ");
1001 
1002  s = format (s, "v%s-table %d ",
1003  mp->table.is_ip6 ? "6" : "4", (mp->table.table_id));
1004 
1005  FINISH;
1006 }
1007 
1008 static void *
1010  void *handle)
1011 {
1012  u8 *s;
1013 
1014  s = format (0, "SCRIPT: ip_table_replace_end ");
1015 
1016  s = format (s, "v%s-table %d ",
1017  mp->table.is_ip6 ? "6" : "4", (mp->table.table_id));
1018 
1019  FINISH;
1020 }
1021 
1023  (vl_api_set_ip_flow_hash_t * mp, void *handle)
1024 {
1025  u8 *s;
1026 
1027  s = format (0, "SCRIPT: set_ip_flow_hash ");
1028 
1029  s = format (s, "vrf_id %d ", (mp->vrf_id));
1030 
1031  if (mp->src)
1032  s = format (s, "src ");
1033 
1034  if (mp->dst)
1035  s = format (s, "dst ");
1036 
1037  if (mp->sport)
1038  s = format (s, "sport ");
1039 
1040  if (mp->dport)
1041  s = format (s, "dport ");
1042 
1043  if (mp->proto)
1044  s = format (s, "proto ");
1045 
1046  if (mp->reverse)
1047  s = format (s, "reverse ");
1048 
1049  if (mp->is_ipv6 != 0)
1050  s = format (s, "ipv6 ");
1051 
1052  FINISH;
1053 }
1054 
1055 
1057  (vl_api_l2_patch_add_del_t * mp, void *handle)
1058 {
1059  u8 *s;
1060 
1061  s = format (0, "SCRIPT: l2_patch_add_del ");
1062 
1063  s = format (s, "rx_sw_if_index %d ", (mp->rx_sw_if_index));
1064 
1065  s = format (s, "tx_sw_if_index %d ", (mp->tx_sw_if_index));
1066 
1067  if (mp->is_add == 0)
1068  s = format (s, "del ");
1069 
1070  FINISH;
1071 }
1072 
1074  (vl_api_sr_localsid_add_del_t * mp, void *handle)
1075 {
1076  vnet_main_t *vnm = vnet_get_main ();
1077  u8 *s;
1078 
1079  s = format (0, "SCRIPT: sr_localsid_add_del ");
1080 
1081  switch (mp->behavior)
1082  {
1083  case SR_BEHAVIOR_END:
1084  s = format (s, "Address: %U\nBehavior: End",
1085  format_ip6_address, (ip6_address_t *) mp->localsid);
1086  s = format (s, (mp->end_psp ? "End.PSP: True" : "End.PSP: False"));
1087  break;
1088  case SR_BEHAVIOR_X:
1089  s =
1090  format (s,
1091  "Address: %U\nBehavior: X (Endpoint with Layer-3 cross-connect)"
1092  "\nIface: %U\nNext hop: %U", format_ip6_address,
1093  (ip6_address_t *) mp->localsid,
1095  format_ip6_address, (ip6_address_t *) mp->nh_addr.un.ip6);
1096  s = format (s, (mp->end_psp ? "End.PSP: True" : "End.PSP: False"));
1097  break;
1098  case SR_BEHAVIOR_DX4:
1099  s =
1100  format (s,
1101  "Address: %U\nBehavior: DX4 (Endpoint with decapsulation with IPv4 cross-connect)"
1102  "\nIface: %U\nNext hop: %U", format_ip6_address,
1103  (ip6_address_t *) mp->localsid,
1105  format_ip4_address, (ip4_address_t *) mp->nh_addr.un.ip4);
1106  break;
1107  case SR_BEHAVIOR_DX6:
1108  s =
1109  format (s,
1110  "Address: %U\nBehavior: DX6 (Endpoint with decapsulation with IPv6 cross-connect)"
1111  "\nIface: %UNext hop: %U", format_ip6_address,
1112  (ip6_address_t *) mp->localsid,
1114  format_ip6_address, (ip6_address_t *) mp->nh_addr.un.ip6);
1115  break;
1116  case SR_BEHAVIOR_DX2:
1117  s =
1118  format (s,
1119  "Address: %U\nBehavior: DX2 (Endpoint with decapulation and Layer-2 cross-connect)"
1120  "\nIface: %U", format_ip6_address,
1121  (ip6_address_t *) mp->localsid,
1123  break;
1124  case SR_BEHAVIOR_DT6:
1125  s =
1126  format (s,
1127  "Address: %U\nBehavior: DT6 (Endpoint with decapsulation and specific IPv6 table lookup)"
1128  "\nTable: %u", format_ip6_address,
1129  (ip6_address_t *) mp->localsid, (mp->fib_table));
1130  break;
1131  case SR_BEHAVIOR_DT4:
1132  s =
1133  format (s,
1134  "Address: %U\nBehavior: DT4 (Endpoint with decapsulation and specific IPv4 table lookup)"
1135  "\nTable: %u", format_ip6_address,
1136  (ip6_address_t *) mp->localsid, (mp->fib_table));
1137  break;
1138  default:
1139  if (mp->behavior >= SR_BEHAVIOR_LAST)
1140  {
1141  s = format (s, "Address: %U\n Behavior: %u",
1142  format_ip6_address, (ip6_address_t *) mp->localsid,
1143  mp->behavior);
1144  }
1145  else
1146  //Should never get here...
1147  s = format (s, "Internal error");
1148  break;
1149  }
1150  FINISH;
1151 }
1152 
1154  (vl_api_sr_steering_add_del_t * mp, void *handle)
1155 {
1156  u8 *s;
1157 
1158  s = format (0, "SCRIPT: sr_steering_add_del ");
1159 
1160  s = format (s, (mp->is_del ? "Del: True" : "Del: False"));
1161 
1162  switch (mp->traffic_type)
1163  {
1164  case SR_STEER_L2:
1165  s = format (s, "Traffic type: L2 iface: %u", (mp->sw_if_index));
1166  break;
1167  case SR_STEER_IPV4:
1168  s = format (s, "Traffic type: IPv4 %U/%u", format_ip4_address,
1169  (ip4_address_t *) mp->prefix.address.un.ip4,
1170  (mp->prefix.len));
1171  break;
1172  case SR_STEER_IPV6:
1173  s = format (s, "Traffic type: IPv6 %U/%u", format_ip6_address,
1174  (ip6_address_t *) mp->prefix.address.un.ip6,
1175  (mp->prefix.len));
1176  break;
1177  default:
1178  s = format (s, "Traffic type: Unknown(%u)", mp->traffic_type);
1179  break;
1180  }
1181  s = format (s, "BindingSID: %U", format_ip6_address,
1182  (ip6_address_t *) mp->bsid_addr);
1183 
1184  s = format (s, "SR Policy Index: %u", (mp->sr_policy_index));
1185 
1186  s = format (s, "FIB_table: %u", (mp->table_id));
1187 
1188  FINISH;
1189 }
1190 
1191 static void *vl_api_sr_policy_add_t_print
1192  (vl_api_sr_policy_add_t * mp, void *handle)
1193 {
1194  u8 *s;
1195 
1196  ip6_address_t *segments = 0, *seg;
1197  ip6_address_t *this_address = (ip6_address_t *) mp->sids.sids;
1198 
1199  int i;
1200  for (i = 0; i < mp->sids.num_sids; i++)
1201  {
1202  vec_add2 (segments, seg, 1);
1203  clib_memcpy (seg->as_u8, this_address->as_u8, sizeof (*this_address));
1204  this_address++;
1205  }
1206 
1207  s = format (0, "SCRIPT: sr_policy_add ");
1208 
1209  s = format (s, "BSID: %U", format_ip6_address,
1210  (ip6_address_t *) mp->bsid_addr);
1211 
1212  s =
1213  format (s,
1214  (mp->is_encap ? "Behavior: Encapsulation" :
1215  "Behavior: SRH insertion"));
1216 
1217  s = format (s, "FIB_table: %u", (mp->fib_table));
1218 
1219  s = format (s, (mp->is_spray ? "Type: Default" : "Type: Spray"));
1220 
1221  s = format (s, "SID list weight: %u", (mp->weight));
1222 
1223  s = format (s, "{");
1224  vec_foreach (seg, segments)
1225  {
1226  s = format (s, "%U, ", format_ip6_address, seg);
1227  }
1228  s = format (s, "\b\b } ");
1229 
1230  FINISH;
1231 }
1232 
1233 static void *vl_api_sr_policy_mod_t_print
1234  (vl_api_sr_policy_mod_t * mp, void *handle)
1235 {
1236  u8 *s;
1237 
1238  ip6_address_t *segments = 0, *seg;
1239  ip6_address_t *this_address = (ip6_address_t *) mp->sids.sids;
1240 
1241  int i;
1242  for (i = 0; i < mp->sids.num_sids; i++)
1243  {
1244  vec_add2 (segments, seg, 1);
1245  clib_memcpy (seg->as_u8, this_address->as_u8, sizeof (*this_address));
1246  this_address++;
1247  }
1248 
1249  s = format (0, "SCRIPT: sr_policy_mod ");
1250 
1251  s = format (s, "BSID: %U", format_ip6_address,
1252  (ip6_address_t *) mp->bsid_addr);
1253 
1254  s = format (s, "SR Policy index: %u", (mp->sr_policy_index));
1255 
1256  s = format (s, "Operation: %u", mp->operation);
1257 
1258  s = format (s, "SID list index: %u", (mp->sl_index));
1259 
1260  s = format (s, "SID list weight: %u", (mp->weight));
1261 
1262  s = format (s, "{");
1263  vec_foreach (seg, segments)
1264  {
1265  s = format (s, "%U, ", format_ip6_address, seg);
1266  }
1267  s = format (s, "\b\b } ");
1268 
1269  FINISH;
1270 }
1271 
1272 static void *vl_api_sr_policy_del_t_print
1273  (vl_api_sr_policy_del_t * mp, void *handle)
1274 {
1275  u8 *s;
1276 
1277  s = format (0, "SCRIPT: sr_policy_del ");
1278  s = format (s, "To be delivered. Good luck.");
1279  FINISH;
1280 }
1281 
1283  (vl_api_classify_add_del_table_t * mp, void *handle)
1284 {
1285  u8 *s;
1286  int i;
1287 
1288  s = format (0, "SCRIPT: classify_add_del_table ");
1289 
1290  if (mp->is_add == 0)
1291  {
1292  s = format (s, "table %d ", (mp->table_index));
1293  s = format (s, "%s ", mp->del_chain ? "del-chain" : "del");
1294  }
1295  else
1296  {
1297  s = format (s, "nbuckets %d ", (mp->nbuckets));
1298  s = format (s, "memory_size %d ", (mp->memory_size));
1299  s = format (s, "skip %d ", (mp->skip_n_vectors));
1300  s = format (s, "match %d ", (mp->match_n_vectors));
1301  s = format (s, "next-table %d ", (mp->next_table_index));
1302  s = format (s, "miss-next %d ", (mp->miss_next_index));
1303  s = format (s, "current-data-flag %d ", (mp->current_data_flag));
1304  if (mp->current_data_flag)
1305  s = format (s, "current-data-offset %d ", (mp->current_data_offset));
1306  s = format (s, "mask hex ");
1307  for (i = 0; i < (mp->match_n_vectors) * sizeof (u32x4); i++)
1308  s = format (s, "%02x", mp->mask[i]);
1309  vec_add1 (s, ' ');
1310  }
1311 
1312  FINISH;
1313 }
1314 
1317 {
1318  u8 *s;
1319  int i, limit = 0;
1320 
1321  s = format (0, "SCRIPT: classify_add_del_session ");
1322 
1323  s = format (s, "table_index %d ", (mp->table_index));
1324  s = format (s, "hit_next_index %d ", (mp->hit_next_index));
1325  s = format (s, "opaque_index %d ", (mp->opaque_index));
1326  s = format (s, "advance %d ", (mp->advance));
1327  s = format (s, "action %d ", mp->action);
1328  if (mp->action)
1329  s = format (s, "metadata %d ", (mp->metadata));
1330  if (mp->is_add == 0)
1331  s = format (s, "del ");
1332 
1333  s = format (s, "match hex ");
1334  for (i = 5 * sizeof (u32x4) - 1; i > 0; i--)
1335  {
1336  if (mp->match[i] != 0)
1337  {
1338  limit = i + 1;
1339  break;
1340  }
1341  }
1342 
1343  for (i = 0; i < limit; i++)
1344  s = format (s, "%02x", mp->match[i]);
1345 
1346  FINISH;
1347 }
1348 
1351 {
1352  u8 *s;
1353 
1354  s = format (0, "SCRIPT: classify_set_interface_ip_table ");
1355 
1356  if (mp->is_ipv6)
1357  s = format (s, "ipv6 ");
1358 
1359  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1360  s = format (s, "table %d ", (mp->table_index));
1361 
1362  FINISH;
1363 }
1364 
1367 {
1368  u8 *s;
1369 
1370  s = format (0, "SCRIPT: classify_set_interface_l2_tables ");
1371 
1372  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1373  s = format (s, "ip4-table %d ", (mp->ip4_table_index));
1374  s = format (s, "ip6-table %d ", (mp->ip6_table_index));
1375  s = format (s, "other-table %d ", (mp->other_table_index));
1376  s = format (s, "is-input %d ", mp->is_input);
1377 
1378  FINISH;
1379 }
1380 
1381 static void *vl_api_add_node_next_t_print
1382  (vl_api_add_node_next_t * mp, void *handle)
1383 {
1384  u8 *s;
1385 
1386  s = format (0, "SCRIPT: add_node_next ");
1387 
1388  s = format (0, "node %s next %s ", mp->node_name, mp->next_name);
1389 
1390  FINISH;
1391 }
1392 
1394  (vl_api_l2tpv3_create_tunnel_t * mp, void *handle)
1395 {
1396  u8 *s;
1397 
1398  s = format (0, "SCRIPT: l2tpv3_create_tunnel ");
1399 
1400  s = format (s, "client_address %U our_address %U ",
1402  (ip6_address_t *) (mp->client_address.un.ip6),
1403  format_ip6_address, (ip6_address_t *) (mp->our_address.un.ip6));
1404  s = format (s, "local_session_id %d ", (mp->local_session_id));
1405  s = format (s, "remote_session_id %d ", (mp->remote_session_id));
1406  s = format (s, "local_cookie %lld ",
1407  clib_net_to_host_u64 (mp->local_cookie));
1408  s = format (s, "remote_cookie %lld ",
1409  clib_net_to_host_u64 (mp->remote_cookie));
1410  if (mp->l2_sublayer_present)
1411  s = format (s, "l2-sublayer-present ");
1412 
1413  FINISH;
1414 }
1415 
1418 {
1419  u8 *s;
1420 
1421  s = format (0, "SCRIPT: l2tpv3_set_tunnel_cookies ");
1422 
1423  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1424 
1425  s = format (s, "new_local_cookie %llu ",
1426  clib_net_to_host_u64 (mp->new_local_cookie));
1427 
1428  s = format (s, "new_remote_cookie %llu ",
1429  clib_net_to_host_u64 (mp->new_remote_cookie));
1430 
1431  FINISH;
1432 }
1433 
1436 {
1437  u8 *s;
1438 
1439  s = format (0, "SCRIPT: l2tpv3_interface_enable_disable ");
1440 
1441  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1442 
1443  if (mp->enable_disable == 0)
1444  s = format (s, "del ");
1445 
1446  FINISH;
1447 }
1448 
1450  (vl_api_l2tpv3_set_lookup_key_t * mp, void *handle)
1451 {
1452  u8 *s;
1453  char *str = "unknown";
1454 
1455  s = format (0, "SCRIPT: l2tpv3_set_lookup_key ");
1456 
1457  switch (mp->key)
1458  {
1460  str = "lookup_v6_src";
1461  break;
1463  str = "lookup_v6_dst";
1464  break;
1465  case L2T_LOOKUP_SESSION_ID:
1466  str = "lookup_session_id";
1467  break;
1468  default:
1469  break;
1470  }
1471 
1472  s = format (s, "%s ", str);
1473 
1474  FINISH;
1475 }
1476 
1479 {
1480  u8 *s;
1481 
1482  s = format (0, "SCRIPT: sw_if_l2tpv3_tunnel_dump ");
1483 
1484  FINISH;
1485 }
1486 
1488  (vl_api_vxlan_add_del_tunnel_t * mp, void *handle)
1489 {
1490  u8 *s;
1491  s = format (0, "SCRIPT: vxlan_add_del_tunnel ");
1492 
1493  ip46_address_t src =
1494  to_ip46 (mp->src_address.af, (u8 *) & mp->src_address.un);
1495  ip46_address_t dst =
1496  to_ip46 (mp->dst_address.af, (u8 *) & mp->dst_address.un);
1497 
1498  u8 is_grp = ip46_address_is_multicast (&dst);
1499  char *dst_name = is_grp ? "group" : "dst";
1500 
1501  s = format (s, "src %U ", format_ip46_address, &src, IP46_TYPE_ANY);
1502  s = format (s, "%s %U ", dst_name, format_ip46_address,
1503  &dst, IP46_TYPE_ANY);
1504 
1505  if (is_grp)
1506  s = format (s, "mcast_sw_if_index %d ", (mp->mcast_sw_if_index));
1507 
1508  if (mp->encap_vrf_id)
1509  s = format (s, "encap-vrf-id %d ", (mp->encap_vrf_id));
1510 
1511  s = format (s, "decap-next %d ", (mp->decap_next_index));
1512 
1513  s = format (s, "vni %d ", (mp->vni));
1514 
1515  s = format (s, "instance %d ", (mp->instance));
1516 
1517  if (mp->is_add == 0)
1518  s = format (s, "del ");
1519 
1520  FINISH;
1521 }
1522 
1524  (vl_api_vxlan_offload_rx_t * mp, void *handle)
1525 {
1526  u8 *s;
1527  s = format (0, "SCRIPT: vxlan_offload_rx ");
1528 
1529  s = format (s, "hw hw_if_index %d ", (mp->hw_if_index));
1530  s = format (s, "rx sw_if_index %d ", (mp->sw_if_index));
1531  if (!mp->enable)
1532  s = format (s, "del ");
1533 
1534  FINISH;
1535 }
1536 
1538  (vl_api_vxlan_tunnel_dump_t * mp, void *handle)
1539 {
1540  u8 *s;
1541 
1542  s = format (0, "SCRIPT: vxlan_tunnel_dump ");
1543 
1544  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1545 
1546  FINISH;
1547 }
1548 
1551 {
1552  u8 *s;
1553  s = format (0, "SCRIPT: vxlan_gbp_tunnel_add_del ");
1554 
1555  if (mp->is_add)
1556  s = format (s, "add ");
1557  else
1558  s = format (s, "del ");
1559 
1560  s = format (s, "instance %d ", (mp->tunnel.instance));
1561  s = format (s, "src %U ", format_vl_api_address, &mp->tunnel.src);
1562  s = format (s, "dst %U ", format_vl_api_address, &mp->tunnel.dst);
1563  s = format (s, "mcast_sw_if_index %d ", (mp->tunnel.mcast_sw_if_index));
1564  s = format (s, "encap_table_id %d ", (mp->tunnel.encap_table_id));
1565  s = format (s, "vni %d ", (mp->tunnel.vni));
1566  s = format (s, "sw_if_index %d ", (mp->tunnel.sw_if_index));
1567 
1568  FINISH;
1569 }
1570 
1572  (vl_api_vxlan_gbp_tunnel_dump_t * mp, void *handle)
1573 {
1574  u8 *s;
1575 
1576  s = format (0, "SCRIPT: vxlan_gbp_tunnel_dump ");
1577 
1578  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1579 
1580  FINISH;
1581 }
1582 
1585 {
1586  u8 *s;
1587 
1588  s = format (0, "SCRIPT: sw_interface_set_vxlan_gbp_bypass ");
1589 
1590  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1591  s = format (s, "%s ", (mp->is_ipv6 != 0) ? "ipv6" : "ipv4");
1592  s = format (s, "%s ", (mp->enable != 0) ? "enable" : "disable");
1593 
1594  FINISH;
1595 }
1596 
1598  (vl_api_geneve_add_del_tunnel_t * mp, void *handle)
1599 {
1600  u8 *s;
1601  s = format (0, "SCRIPT: geneve_add_del_tunnel ");
1602 
1603  ip46_address_t local;
1604  ip46_address_t remote;
1605  ip_address_decode (&mp->remote_address, &remote);
1606  ip_address_decode (&mp->local_address, &local);
1607 
1608  u8 is_grp = ip46_address_is_multicast (&remote);
1609  char *remote_name = is_grp ? "group" : "dst";
1610 
1611  s = format (s, "src %U ", format_ip46_address, &local, IP46_TYPE_ANY);
1612  s = format (s, "%s %U ", remote_name, format_ip46_address,
1613  &remote, IP46_TYPE_ANY);
1614 
1615  if (is_grp)
1616  s = format (s, "mcast_sw_if_index %d ", (mp->mcast_sw_if_index));
1617 
1618  if (mp->encap_vrf_id)
1619  s = format (s, "encap-vrf-id %d ", (mp->encap_vrf_id));
1620 
1621  s = format (s, "decap-next %d ", (mp->decap_next_index));
1622 
1623  s = format (s, "vni %d ", (mp->vni));
1624 
1625  if (mp->is_add == 0)
1626  s = format (s, "del ");
1627 
1628  FINISH;
1629 }
1630 
1632  (vl_api_geneve_tunnel_dump_t * mp, void *handle)
1633 {
1634  u8 *s;
1635 
1636  s = format (0, "SCRIPT: geneve_tunnel_dump ");
1637 
1638  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1639 
1640  FINISH;
1641 }
1642 
1644  (vl_api_gre_tunnel_add_del_t * mp, void *handle)
1645 {
1646  u8 *s;
1647 
1648  s = format (0, "SCRIPT: gre_tunnel_add_del ");
1649 
1650  s = format (s, "dst %U ", format_vl_api_address, &mp->tunnel.dst);
1651  s = format (s, "src %U ", format_vl_api_address, &mp->tunnel.src);
1652 
1653  s = format (s, "instance %d ", (mp->tunnel.instance));
1654 
1655  if (mp->tunnel.type == GRE_API_TUNNEL_TYPE_TEB)
1656  s = format (s, "teb ");
1657 
1658  if (mp->tunnel.type == GRE_API_TUNNEL_TYPE_ERSPAN)
1659  s = format (s, "erspan %d ", (mp->tunnel.session_id));
1660 
1661  if (mp->tunnel.outer_table_id)
1662  s = format (s, "outer-table-id %d ", mp->tunnel.outer_table_id);
1663 
1664  if (mp->is_add == 0)
1665  s = format (s, "del ");
1666 
1667  FINISH;
1668 }
1669 
1670 static void *vl_api_gre_tunnel_dump_t_print
1671  (vl_api_gre_tunnel_dump_t * mp, void *handle)
1672 {
1673  u8 *s;
1674 
1675  s = format (0, "SCRIPT: gre_tunnel_dump ");
1676 
1677  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1678 
1679  FINISH;
1680 }
1681 
1683  (vl_api_l2_fib_clear_table_t * mp, void *handle)
1684 {
1685  u8 *s;
1686 
1687  s = format (0, "SCRIPT: l2_fib_clear_table ");
1688 
1689  FINISH;
1690 }
1691 
1694 {
1695  u8 *s;
1696 
1697  s = format (0, "SCRIPT: l2_interface_efp_filter ");
1698 
1699  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1700  if (mp->enable_disable)
1701  s = format (s, "enable ");
1702  else
1703  s = format (s, "disable ");
1704 
1705  FINISH;
1706 }
1707 
1710 {
1711  u8 *s;
1712 
1713  s = format (0, "SCRIPT: l2_interface_vlan_tag_rewrite ");
1714 
1715  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1716  s = format (s, "vtr_op %d ", (mp->vtr_op));
1717  s = format (s, "push_dot1q %d ", (mp->push_dot1q));
1718  s = format (s, "tag1 %d ", (mp->tag1));
1719  s = format (s, "tag2 %d ", (mp->tag2));
1720 
1721  FINISH;
1722 }
1723 
1725  (vl_api_create_vhost_user_if_t * mp, void *handle)
1726 {
1727  u8 *s;
1728 
1729  s = format (0, "SCRIPT: create_vhost_user_if ");
1730 
1731  s = format (s, "socket %s ", mp->sock_filename);
1732  if (mp->is_server)
1733  s = format (s, "server ");
1734  if (mp->renumber)
1735  s = format (s, "renumber %d ", (mp->custom_dev_instance));
1736  if (mp->disable_mrg_rxbuf)
1737  s = format (s, "disable_mrg_rxbuf ");
1738  if (mp->disable_indirect_desc)
1739  s = format (s, "disable_indirect_desc ");
1740  if (mp->tag[0])
1741  s = format (s, "tag %s ", mp->tag);
1742  if (mp->enable_gso)
1743  s = format (s, "gso ");
1744  if (mp->enable_packed)
1745  s = format (s, "packed");
1746 
1747  FINISH;
1748 }
1749 
1751  (vl_api_modify_vhost_user_if_t * mp, void *handle)
1752 {
1753  u8 *s;
1754 
1755  s = format (0, "SCRIPT: modify_vhost_user_if ");
1756 
1757  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1758  s = format (s, "socket %s ", mp->sock_filename);
1759  if (mp->is_server)
1760  s = format (s, "server ");
1761  if (mp->renumber)
1762  s = format (s, "renumber %d ", (mp->custom_dev_instance));
1763  if (mp->enable_gso)
1764  s = format (s, "gso ");
1765  if (mp->enable_packed)
1766  s = format (s, "packed");
1767 
1768  FINISH;
1769 }
1770 
1772  (vl_api_delete_vhost_user_if_t * mp, void *handle)
1773 {
1774  u8 *s;
1775 
1776  s = format (0, "SCRIPT: delete_vhost_user_if ");
1777  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1778 
1779  FINISH;
1780 }
1781 
1784 {
1785  u8 *s;
1786 
1787  s = format (0, "SCRIPT: sw_interface_vhost_user_dump ");
1788  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1789 
1790  FINISH;
1791 }
1792 
1794  (vl_api_sw_interface_dump_t * mp, void *handle)
1795 {
1796  u8 *s;
1797 
1798  s = format (0, "SCRIPT: sw_interface_dump ");
1799 
1800  if (mp->name_filter_valid)
1801  {
1802  u8 *v = vl_api_from_api_to_new_vec (mp, &mp->name_filter);
1803  s = format (s, "name_filter %v ", v);
1804  vec_free (v);
1805  }
1806  else
1807  s = format (s, "all ");
1808 
1809  FINISH;
1810 }
1811 
1813  (vl_api_l2_fib_table_dump_t * mp, void *handle)
1814 {
1815  u8 *s;
1816 
1817  s = format (0, "SCRIPT: l2_fib_table_dump ");
1818 
1819  s = format (s, "bd_id %d ", (mp->bd_id));
1820 
1821  FINISH;
1822 }
1823 
1824 static void *vl_api_control_ping_t_print
1825  (vl_api_control_ping_t * mp, void *handle)
1826 {
1827  u8 *s;
1828 
1829  s = format (0, "SCRIPT: control_ping ");
1830 
1831  FINISH;
1832 }
1833 
1835  (vl_api_want_interface_events_t * mp, void *handle)
1836 {
1837  u8 *s;
1838 
1839  s = format (0, "SCRIPT: want_interface_events pid %d enable %d ",
1840  (mp->pid), ntohl (mp->enable_disable));
1841 
1842  FINISH;
1843 }
1844 
1845 static void *
1846 vl_api_cli_t_print (vl_api_cli_t * mp, void *handle)
1847 {
1848  u8 *s;
1849 
1850  s = format (0, "SCRIPT: cli ");
1851 
1852  FINISH;
1853 }
1854 
1855 static void *vl_api_cli_inband_t_print
1856  (vl_api_cli_inband_t * mp, void *handle)
1857 {
1858  u8 *s;
1859  u8 *cmd = 0;
1860 
1861  cmd = vl_api_from_api_to_new_vec (mp, &mp->cmd);
1862 
1863  s = format (0, "SCRIPT: exec %v ", cmd);
1864 
1865  vec_free (cmd);
1866  FINISH;
1867 }
1868 
1869 static void *vl_api_memclnt_create_t_print
1870  (vl_api_memclnt_create_t * mp, void *handle)
1871 {
1872  u8 *s;
1873 
1874  s = format (0, "SCRIPT: memclnt_create name %s ", mp->name);
1875 
1876  FINISH;
1877 }
1878 
1879 static void *vl_api_sockclnt_create_t_print
1880  (vl_api_sockclnt_create_t * mp, void *handle)
1881 {
1882  u8 *s;
1883 
1884  s = format (0, "SCRIPT: sockclnt_create name %s ", mp->name);
1885 
1886  FINISH;
1887 }
1888 
1889 static void *vl_api_show_version_t_print
1890  (vl_api_show_version_t * mp, void *handle)
1891 {
1892  u8 *s;
1893 
1894  s = format (0, "SCRIPT: show_version ");
1895 
1896  FINISH;
1897 }
1898 
1899 __clib_unused
1900  static void *vl_api_show_threads_t_print
1901  (vl_api_show_threads_t * mp, void *handle)
1902 {
1903  u8 *s;
1904 
1905  s = format (0, "SCRIPT: show_threads ");
1906 
1907  FINISH;
1908 }
1909 
1912 {
1913  u8 *s;
1914 
1915  s = format (0, "SCRIPT: vxlan_gpe_add_del_tunnel ");
1916 
1917  ip46_address_t local, remote;
1918 
1919  ip_address_decode (&mp->local, &local);
1920  ip_address_decode (&mp->remote, &remote);
1921 
1922  u8 is_grp = ip46_address_is_multicast (&remote);
1923  char *remote_name = is_grp ? "group" : "remote";
1924 
1925  s = format (s, "local %U ", format_ip46_address, &local, IP46_TYPE_ANY);
1926  s = format (s, "%s %U ", remote_name, format_ip46_address,
1927  &remote, IP46_TYPE_ANY);
1928 
1929  if (is_grp)
1930  s = format (s, "mcast_sw_if_index %d ", (mp->mcast_sw_if_index));
1931  s = format (s, "protocol %d ", (mp->protocol));
1932 
1933  s = format (s, "vni %d ", (mp->vni));
1934 
1935  if (mp->is_add == 0)
1936  s = format (s, "del ");
1937 
1938  if (mp->encap_vrf_id)
1939  s = format (s, "encap-vrf-id %d ", (mp->encap_vrf_id));
1940 
1941  if (mp->decap_vrf_id)
1942  s = format (s, "decap-vrf-id %d ", (mp->decap_vrf_id));
1943 
1944  FINISH;
1945 }
1946 
1948  (vl_api_vxlan_gpe_tunnel_dump_t * mp, void *handle)
1949 {
1950  u8 *s;
1951 
1952  s = format (0, "SCRIPT: vxlan_gpe_tunnel_dump ");
1953 
1954  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1955 
1956  FINISH;
1957 }
1958 
1961 {
1962  u8 *s;
1963 
1964  s = format (0, "SCRIPT: interface_renumber ");
1965 
1966  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1967 
1968  s = format (s, "new_show_dev_instance %d ", (mp->new_show_dev_instance));
1969 
1970  FINISH;
1971 }
1972 
1974  (vl_api_want_l2_macs_events_t * mp, void *handle)
1975 {
1976  u8 *s;
1977 
1978  s = format (0, "SCRIPT: want_l2_macs_events ");
1979  s = format (s, "learn-limit %d ", (mp->learn_limit));
1980  s = format (s, "scan-delay %d ", (u32) mp->scan_delay);
1981  s = format (s, "max-entries %d ", (u32) mp->max_macs_in_event * 10);
1982  if (mp->enable_disable == 0)
1983  s = format (s, "disable");
1984 
1985  FINISH;
1986 }
1987 
1990 {
1991  u8 *s;
1992 
1993  s = format (0, "SCRIPT: input_acl_set_interface ");
1994 
1995  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
1996  s = format (s, "ip4-table %d ", (mp->ip4_table_index));
1997  s = format (s, "ip6-table %d ", (mp->ip6_table_index));
1998  s = format (s, "l2-table %d ", (mp->l2_table_index));
1999 
2000  if (mp->is_add == 0)
2001  s = format (s, "del ");
2002 
2003  FINISH;
2004 }
2005 
2008 {
2009  u8 *s;
2010 
2011  s = format (0, "SCRIPT: output_acl_set_interface ");
2012 
2013  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2014  s = format (s, "ip4-table %d ", (mp->ip4_table_index));
2015  s = format (s, "ip6-table %d ", (mp->ip6_table_index));
2016  s = format (s, "l2-table %d ", (mp->l2_table_index));
2017 
2018  if (mp->is_add == 0)
2019  s = format (s, "del ");
2020 
2021  FINISH;
2022 }
2023 
2024 static void *vl_api_ip_address_dump_t_print
2025  (vl_api_ip_address_dump_t * mp, void *handle)
2026 {
2027  u8 *s;
2028 
2029  s = format (0, "SCRIPT: ip6_address_dump ");
2030  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2031  s = format (s, "is_ipv6 %d ", mp->is_ipv6 != 0);
2032 
2033  FINISH;
2034 }
2035 
2036 static void *
2038 {
2039  u8 *s;
2040 
2041  s = format (0, "SCRIPT: ip_dump ");
2042  s = format (s, "is_ipv6 %d ", mp->is_ipv6 != 0);
2043 
2044  FINISH;
2045 }
2046 
2049 {
2050  u8 *s;
2051 
2052  s = format (0, "SCRIPT: cop_interface_enable_disable ");
2053  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2054  if (mp->enable_disable)
2055  s = format (s, "enable ");
2056  else
2057  s = format (s, "disable ");
2058 
2059  FINISH;
2060 }
2061 
2064 {
2065  u8 *s;
2066 
2067  s = format (0, "SCRIPT: cop_whitelist_enable_disable ");
2068  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2069  s = format (s, "fib-id %d ", (mp->fib_id));
2070  if (mp->ip4)
2071  s = format (s, "ip4 ");
2072  if (mp->ip6)
2073  s = format (s, "ip6 ");
2074  if (mp->default_cop)
2075  s = format (s, "default ");
2076 
2077  FINISH;
2078 }
2079 
2081  (vl_api_af_packet_create_t * mp, void *handle)
2082 {
2083  u8 *s;
2084 
2085  s = format (0, "SCRIPT: af_packet_create ");
2086  s = format (s, "host_if_name %s ", mp->host_if_name);
2087  if (mp->use_random_hw_addr)
2088  s = format (s, "hw_addr random ");
2089  else
2090  s = format (s, "hw_addr %U ", format_ethernet_address, mp->hw_addr);
2091 
2092  FINISH;
2093 }
2094 
2096  (vl_api_af_packet_delete_t * mp, void *handle)
2097 {
2098  u8 *s;
2099 
2100  s = format (0, "SCRIPT: af_packet_delete ");
2101  s = format (s, "host_if_name %s ", mp->host_if_name);
2102 
2103  FINISH;
2104 }
2105 
2106 static void *vl_api_af_packet_dump_t_print
2107  (vl_api_af_packet_dump_t * mp, void *handle)
2108 {
2109  u8 *s;
2110 
2111  s = format (0, "SCRIPT: af_packet_dump ");
2112 
2113  FINISH;
2114 }
2115 
2116 static u8 *
2117 format_policer_action (u8 * s, va_list * va)
2118 {
2119  u32 action = va_arg (*va, u32);
2120  u32 dscp = va_arg (*va, u32);
2121  char *t = 0;
2122 
2123  if (action == SSE2_QOS_ACTION_DROP)
2124  s = format (s, "drop");
2125  else if (action == SSE2_QOS_ACTION_TRANSMIT)
2126  s = format (s, "transmit");
2127  else if (action == SSE2_QOS_ACTION_MARK_AND_TRANSMIT)
2128  {
2129  s = format (s, "mark-and-transmit ");
2130  switch (dscp)
2131  {
2132 #define _(v,f,str) case VNET_DSCP_##f: t = str; break;
2134 #undef _
2135  default:
2136  break;
2137  }
2138  s = format (s, "%s", t);
2139  }
2140  return s;
2141 }
2142 
2143 static void *vl_api_policer_add_del_t_print
2144  (vl_api_policer_add_del_t * mp, void *handle)
2145 {
2146  u8 *s;
2147 
2148  s = format (0, "SCRIPT: policer_add_del ");
2149  s = format (s, "name %s ", mp->name);
2150  s = format (s, "cir %d ", mp->cir);
2151  s = format (s, "eir %d ", mp->eir);
2152  s = format (s, "cb %d ", mp->cb);
2153  s = format (s, "eb %d ", mp->eb);
2154 
2155  switch (mp->rate_type)
2156  {
2157  case SSE2_QOS_RATE_KBPS:
2158  s = format (s, "rate_type kbps ");
2159  break;
2160  case SSE2_QOS_RATE_PPS:
2161  s = format (s, "rate_type pps ");
2162  break;
2163  default:
2164  break;
2165  }
2166 
2167  switch (mp->round_type)
2168  {
2170  s = format (s, "round_type closest ");
2171  break;
2172  case SSE2_QOS_ROUND_TO_UP:
2173  s = format (s, "round_type up ");
2174  break;
2176  s = format (s, "round_type down ");
2177  break;
2178  default:
2179  break;
2180  }
2181 
2182  switch (mp->type)
2183  {
2185  s = format (s, "type 1r2c ");
2186  break;
2188  s = format (s, "type 1r3c ");
2189  break;
2191  s = format (s, "type 2r3c-2698 ");
2192  break;
2194  s = format (s, "type 2r3c-4115 ");
2195  break;
2197  s = format (s, "type 2r3c-mef5cf1 ");
2198  break;
2199  default:
2200  break;
2201  }
2202 
2203  s = format (s, "conform_action %U ", format_policer_action,
2204  mp->conform_action.type, mp->conform_action.dscp);
2205  s = format (s, "exceed_action %U ", format_policer_action,
2206  mp->exceed_action.type, mp->exceed_action.dscp);
2207  s = format (s, "violate_action %U ", format_policer_action,
2208  mp->violate_action.type, mp->violate_action.dscp);
2209 
2210  if (mp->color_aware)
2211  s = format (s, "color-aware ");
2212  if (mp->is_add == 0)
2213  s = format (s, "del ");
2214 
2215  FINISH;
2216 }
2217 
2218 static void *vl_api_policer_dump_t_print
2219  (vl_api_policer_dump_t * mp, void *handle)
2220 {
2221  u8 *s;
2222 
2223  s = format (0, "SCRIPT: policer_dump ");
2224  if (mp->match_name_valid)
2225  s = format (s, "name %s ", mp->match_name);
2226 
2227  FINISH;
2228 }
2229 
2232 {
2233  u8 *s;
2234 
2235  s = format (0, "SCRIPT: policer_classify_set_interface ");
2236  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2237  if (mp->ip4_table_index != ~0)
2238  s = format (s, "ip4-table %d ", (mp->ip4_table_index));
2239  if (mp->ip6_table_index != ~0)
2240  s = format (s, "ip6-table %d ", (mp->ip6_table_index));
2241  if (mp->l2_table_index != ~0)
2242  s = format (s, "l2-table %d ", (mp->l2_table_index));
2243  if (mp->is_add == 0)
2244  s = format (s, "del ");
2245 
2246  FINISH;
2247 }
2248 
2250  (vl_api_policer_classify_dump_t * mp, void *handle)
2251 {
2252  u8 *s;
2253 
2254  s = format (0, "SCRIPT: policer_classify_dump ");
2255  switch (mp->type)
2256  {
2258  s = format (s, "type ip4 ");
2259  break;
2261  s = format (s, "type ip6 ");
2262  break;
2264  s = format (s, "type l2 ");
2265  break;
2266  default:
2267  break;
2268  }
2269 
2270  FINISH;
2271 }
2272 
2275 {
2276  u8 *s;
2277 
2278  s = format (0, "SCRIPT: sw_interface_clear_stats ");
2279  if (mp->sw_if_index != ~0)
2280  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2281 
2282  FINISH;
2283 }
2284 
2286  (vl_api_mpls_tunnel_dump_t * mp, void *handle)
2287 {
2288  u8 *s;
2289 
2290  s = format (0, "SCRIPT: mpls_tunnel_dump ");
2291  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2292 
2293  FINISH;
2294 }
2295 
2296 static void *vl_api_mpls_table_dump_t_print
2297  (vl_api_mpls_table_dump_t * mp, void *handle)
2298 {
2299  u8 *s;
2300 
2301  s = format (0, "SCRIPT: mpls_table_decap_dump ");
2302 
2303  FINISH;
2304 }
2305 
2306 static void *vl_api_mpls_route_dump_t_print
2307  (vl_api_mpls_route_dump_t * mp, void *handle)
2308 {
2309  u8 *s;
2310 
2311  s = format (0, "SCRIPT: mpls_route_decap_dump ");
2312 
2313  FINISH;
2314 }
2315 
2316 static void *vl_api_ip_table_dump_t_print
2317  (vl_api_ip_table_dump_t * mp, void *handle)
2318 {
2319  u8 *s;
2320 
2321  s = format (0, "SCRIPT: ip_table_dump ");
2322 
2323  FINISH;
2324 }
2325 
2326 static void *vl_api_ip_route_dump_t_print
2327  (vl_api_ip_route_dump_t * mp, void *handle)
2328 {
2329  u8 *s;
2330 
2331  s = format (0, "SCRIPT: ip_route_dump ");
2332 
2333  FINISH;
2334 }
2335 
2337  (vl_api_classify_table_ids_t * mp, void *handle)
2338 {
2339  u8 *s;
2340 
2341  s = format (0, "SCRIPT: classify_table_ids ");
2342 
2343  FINISH;
2344 }
2345 
2348 {
2349  u8 *s;
2350 
2351  s = format (0, "SCRIPT: classify_table_by_interface ");
2352  if (mp->sw_if_index != ~0)
2353  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2354 
2355  FINISH;
2356 }
2357 
2359  (vl_api_classify_table_info_t * mp, void *handle)
2360 {
2361  u8 *s;
2362 
2363  s = format (0, "SCRIPT: classify_table_info ");
2364  if (mp->table_id != ~0)
2365  s = format (s, "table_id %d ", (mp->table_id));
2366 
2367  FINISH;
2368 }
2369 
2371  (vl_api_classify_session_dump_t * mp, void *handle)
2372 {
2373  u8 *s;
2374 
2375  s = format (0, "SCRIPT: classify_session_dump ");
2376  if (mp->table_id != ~0)
2377  s = format (s, "table_id %d ", (mp->table_id));
2378 
2379  FINISH;
2380 }
2381 
2383  (vl_api_set_ipfix_exporter_t * mp, void *handle)
2384 {
2385  u8 *s;
2386 
2387  s = format (0, "SCRIPT: set_ipfix_exporter ");
2388 
2389  s = format (s, "collector-address %U ", format_ip4_address,
2390  (ip4_address_t *) mp->collector_address.un.ip4);
2391  s = format (s, "collector-port %d ", (mp->collector_port));
2392  s = format (s, "src-address %U ", format_ip4_address,
2393  (ip4_address_t *) mp->src_address.un.ip4);
2394  s = format (s, "vrf-id %d ", (mp->vrf_id));
2395  s = format (s, "path-mtu %d ", (mp->path_mtu));
2396  s = format (s, "template-interval %d ", (mp->template_interval));
2397  s = format (s, "udp-checksum %d ", mp->udp_checksum);
2398 
2399  FINISH;
2400 }
2401 
2403  (vl_api_ipfix_exporter_dump_t * mp, void *handle)
2404 {
2405  u8 *s;
2406 
2407  s = format (0, "SCRIPT: ipfix_exporter_dump ");
2408 
2409  FINISH;
2410 }
2411 
2414 {
2415  u8 *s;
2416 
2417  s = format (0, "SCRIPT: set_ipfix_classify_stream ");
2418 
2419  s = format (s, "domain-id %d ", (mp->domain_id));
2420  s = format (s, "src-port %d ", (mp->src_port));
2421 
2422  FINISH;
2423 }
2424 
2427 {
2428  u8 *s;
2429 
2430  s = format (0, "SCRIPT: ipfix_classify_stream_dump ");
2431 
2432  FINISH;
2433 }
2434 
2437 {
2438  u8 *s;
2439 
2440  s = format (0, "SCRIPT: ipfix_classify_table_add_del ");
2441 
2442  s = format (s, "table-id %d ", (mp->table_id));
2443  s = format (s, "ip-version %d ", mp->ip_version);
2444  s = format (s, "transport-protocol %d ", mp->transport_protocol);
2445 
2446  FINISH;
2447 }
2448 
2451 {
2452  u8 *s;
2453 
2454  s = format (0, "SCRIPT: ipfix_classify_table_dump ");
2455 
2456  FINISH;
2457 }
2458 
2461 {
2462  u8 *s;
2463 
2464  s = format (0, "SCRIPT: sw_interface_span_enable_disable ");
2465  s = format (s, "src_sw_if_index %u ", (mp->sw_if_index_from));
2466  s = format (s, "dst_sw_if_index %u ", (mp->sw_if_index_to));
2467 
2468  if (mp->is_l2)
2469  s = format (s, "l2 ");
2470 
2471  switch (mp->state)
2472  {
2473  case 0:
2474  s = format (s, "disable ");
2475  break;
2476  case 1:
2477  s = format (s, "rx ");
2478  break;
2479  case 2:
2480  s = format (s, "tx ");
2481  break;
2482  case 3:
2483  default:
2484  s = format (s, "both ");
2485  break;
2486  }
2487 
2488  FINISH;
2489 }
2490 
2491 static void *
2493  void *handle)
2494 {
2495  u8 *s;
2496 
2497  s = format (0, "SCRIPT: sw_interface_span_dump ");
2498 
2499  if (mp->is_l2)
2500  s = format (s, "l2 ");
2501 
2502  FINISH;
2503 }
2504 
2505 static void *vl_api_get_next_index_t_print
2506  (vl_api_get_next_index_t * mp, void *handle)
2507 {
2508  u8 *s;
2509 
2510  s = format (0, "SCRIPT: get_next_index ");
2511  s = format (s, "node-name %s ", mp->node_name);
2512  s = format (s, "next-node-name %s ", mp->next_name);
2513 
2514  FINISH;
2515 }
2516 
2518  (vl_api_pg_create_interface_t * mp, void *handle)
2519 {
2520  u8 *s;
2521 
2522  s = format (0, "SCRIPT: pg_create_interface ");
2523  s = format (0, "if_id %d", (mp->interface_id));
2524  s = format (0, "gso-enabled %u", mp->gso_enabled);
2525  s = format (0, "gso-size %u", (mp->gso_size));
2526 
2527  FINISH;
2528 }
2529 
2530 static void *vl_api_pg_capture_t_print
2531  (vl_api_pg_capture_t * mp, void *handle)
2532 {
2533  u8 *s;
2534 
2535  s = format (0, "SCRIPT: pg_capture ");
2536  s = format (0, "if_id %d ", (mp->interface_id));
2537  s = format (0, "pcap %s", mp->pcap_file_name);
2538  if (mp->count != ~0)
2539  s = format (s, "count %d ", (mp->count));
2540  if (!mp->is_enabled)
2541  s = format (s, "disable");
2542 
2543  FINISH;
2544 }
2545 
2547  (vl_api_pg_enable_disable_t * mp, void *handle)
2548 {
2549  u8 *s;
2550 
2551  s = format (0, "SCRIPT: pg_enable_disable ");
2552  if (vl_api_string_len (&mp->stream_name) > 0)
2553  s =
2554  format (s, "stream %s",
2556  if (!mp->is_enabled)
2557  s = format (s, "disable");
2558 
2559  FINISH;
2560 }
2561 
2564 {
2565  u8 *s;
2566  int i;
2567 
2568  s = format (0, "SCRIPT: ip_source_and_port_range_check_add_del ");
2569  s = format (s, "%U ", format_vl_api_prefix, &mp->prefix);
2570 
2571  for (i = 0; i < mp->number_of_ranges; i++)
2572  {
2573  s = format (s, "range %d - %d ", mp->low_ports[i], mp->high_ports[i]);
2574  }
2575 
2576  s = format (s, "vrf %d ", (mp->vrf_id));
2577 
2578  if (mp->is_add == 0)
2579  s = format (s, "del ");
2580 
2581  FINISH;
2582 }
2583 
2586  void *handle)
2587 {
2588  u8 *s;
2589 
2590  s = format (0, "SCRIPT: ip_source_and_port_range_check_interface_add_del ");
2591 
2592  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
2593 
2594  if (mp->tcp_out_vrf_id != ~0)
2595  s = format (s, "tcp-out-vrf %d ", (mp->tcp_out_vrf_id));
2596 
2597  if (mp->udp_out_vrf_id != ~0)
2598  s = format (s, "udp-out-vrf %d ", (mp->udp_out_vrf_id));
2599 
2600  if (mp->tcp_in_vrf_id != ~0)
2601  s = format (s, "tcp-in-vrf %d ", (mp->tcp_in_vrf_id));
2602 
2603  if (mp->udp_in_vrf_id != ~0)
2604  s = format (s, "udp-in-vrf %d ", (mp->udp_in_vrf_id));
2605 
2606  if (mp->is_add == 0)
2607  s = format (s, "del ");
2608 
2609  FINISH;
2610 }
2611 
2613  (vl_api_lisp_enable_disable_t * mp, void *handle)
2614 {
2615  u8 *s;
2616 
2617  s = format (0, "SCRIPT: lisp_enable_disable %s",
2618  mp->is_enable ? "enable" : "disable");
2619 
2620  FINISH;
2621 }
2622 
2624  (vl_api_gpe_add_del_iface_t * mp, void *handle)
2625 {
2626  u8 *s;
2627 
2628  s = format (0, "SCRIPT: gpe_add_del_iface ");
2629 
2630  s = format (s, "%s ", mp->is_add ? "up" : "down");
2631  s = format (s, "vni %d ", mp->vni);
2632  s = format (s, "%s %d ", mp->is_l2 ? "bd_id" : "table_id", mp->dp_table);
2633 
2634  FINISH;
2635 }
2636 
2639 {
2640  u8 *s;
2641 
2642  s = format (0, "SCRIPT: lisp_pitr_set_locator_set ");
2643 
2644  if (mp->is_add)
2645  s = format (s, "locator-set %s ", mp->ls_name);
2646  else
2647  s = format (s, "del");
2648 
2649  FINISH;
2650 }
2651 
2652 static u8 *
2653 format_nsh_address_vat (u8 * s, va_list * args)
2654 {
2655  nsh_t *a = va_arg (*args, nsh_t *);
2656  return format (s, "SPI:%d SI:%d", clib_net_to_host_u32 (a->spi), a->si);
2657 }
2658 
2659 static u8 *
2660 format_lisp_flat_eid (u8 * s, va_list * args)
2661 {
2662  vl_api_eid_t *eid = va_arg (*args, vl_api_eid_t *);
2663 
2664  switch (eid->type)
2665  {
2666  case EID_TYPE_API_PREFIX:
2667  if (eid->address.prefix.address.af)
2668  return format (s, "%U/%d", format_ip6_address,
2669  eid->address.prefix.address.un.ip6,
2670  eid->address.prefix.len);
2671  return format (s, "%U/%d", format_ip4_address,
2672  eid->address.prefix.address.un.ip4,
2673  eid->address.prefix.len);
2674  case EID_TYPE_API_MAC:
2675  return format (s, "%U", format_ethernet_address, eid->address.mac);
2676  case EID_TYPE_API_NSH:
2677  return format (s, "%U", format_nsh_address_vat, eid->address.nsh);
2678  }
2679  return 0;
2680 }
2681 
2684 {
2685  u8 *s;
2686  u32 rloc_num = 0;
2687 
2688  s = format (0, "SCRIPT: lisp_add_del_remote_mapping ");
2689 
2690  if (mp->del_all)
2691  s = format (s, "del-all ");
2692 
2693  s = format (s, "%s ", mp->is_add ? "add" : "del");
2694  s = format (s, "vni %d ", (mp->vni));
2695 
2696  s = format (s, "eid %U ", format_lisp_flat_eid, &mp->deid);
2697 
2698  if (mp->is_src_dst)
2699  {
2700  s = format (s, "seid %U ", format_lisp_flat_eid, &mp->seid);
2701  }
2702  rloc_num = (mp->rloc_num);
2703 
2704  if (0 == rloc_num)
2705  s = format (s, "action %d", mp->action);
2706 
2707  FINISH;
2708 }
2709 
2711  (vl_api_lisp_add_del_adjacency_t * mp, void *handle)
2712 {
2713  u8 *s;
2714 
2715  s = format (0, "SCRIPT: lisp_add_del_adjacency ");
2716 
2717  s = format (s, "%s ", mp->is_add ? "add" : "del");
2718  s = format (s, "vni %d ", (mp->vni));
2719  s = format (s, "reid %U leid %U ",
2721  &mp->leid);
2722 
2723  FINISH;
2724 }
2725 
2728 {
2729  u8 *s;
2730 
2731  s = format (0, "SCRIPT: lisp_add_del_map_request_itr_rlocs ");
2732 
2733  if (mp->is_add)
2734  s = format (s, "%s", mp->locator_set_name);
2735  else
2736  s = format (s, "del");
2737 
2738  FINISH;
2739 }
2740 
2743 {
2744  u8 *s;
2745 
2746  s = format (0, "SCRIPT: lisp_eid_table_add_del_map ");
2747 
2748  if (!mp->is_add)
2749  s = format (s, "del ");
2750 
2751  s = format (s, "vni %d ", (mp->vni));
2752  s = format (s, "%s %d ", mp->is_l2 ? "bd_index" : "vrf", (mp->dp_table));
2753  FINISH;
2754 }
2755 
2757  (vl_api_lisp_add_del_local_eid_t * mp, void *handle)
2758 {
2759  u8 *s;
2760 
2761  s = format (0, "SCRIPT: lisp_add_del_local_eid ");
2762 
2763  if (!mp->is_add)
2764  s = format (s, "del ");
2765 
2766  s = format (s, "vni %d ", (mp->vni));
2767  s = format (s, "eid %U ", format_lisp_flat_eid, &mp->eid);
2768  s = format (s, "locator-set %s ", mp->locator_set_name);
2769  if (mp->key.id)
2770  {
2771  u32 key_id = mp->key.id;
2772  s = format (s, "key-id %U", format_hmac_key_id, key_id);
2773  s = format (s, "secret-key %s", mp->key.key);
2774  }
2775  FINISH;
2776 }
2777 
2779  (vl_api_gpe_add_del_fwd_entry_t * mp, void *handle)
2780 {
2781  u8 *s;
2782 
2783  s = format (0, "SCRIPT: gpe_add_del_fwd_entry TODO");
2784 
2785  FINISH;
2786 }
2787 
2790 {
2791  u8 *s;
2792 
2793  s = format (0, "SCRIPT: lisp_add_del_map_resolver ");
2794 
2795  if (!mp->is_add)
2796  s = format (s, "del ");
2797 
2798  if (mp->ip_address.af)
2799  s = format (s, "%U ", format_ip6_address, mp->ip_address.un.ip6);
2800  else
2801  s = format (s, "%U ", format_ip4_address, mp->ip_address.un.ip4);
2802 
2803  FINISH;
2804 }
2805 
2807  (vl_api_gpe_enable_disable_t * mp, void *handle)
2808 {
2809  u8 *s;
2810 
2811  s = format (0, "SCRIPT: gpe_enable_disable ");
2812 
2813  s = format (s, "%s ", mp->is_enable ? "enable" : "disable");
2814 
2815  FINISH;
2816 }
2817 
2820 {
2821  u8 *s;
2822 
2823  s = format (0, "SCRIPT: lisp_add_del_locator_set ");
2824 
2825  if (!mp->is_add)
2826  s = format (s, "del ");
2827 
2828  s = format (s, "locator-set %s ", mp->locator_set_name);
2829 
2830  FINISH;
2831 }
2832 
2834  (vl_api_lisp_add_del_locator_t * mp, void *handle)
2835 {
2836  u8 *s;
2837 
2838  s = format (0, "SCRIPT: lisp_add_del_locator ");
2839 
2840  if (!mp->is_add)
2841  s = format (s, "del ");
2842 
2843  s = format (s, "locator-set %s ", mp->locator_set_name);
2844  s = format (s, "sw_if_index %d ", mp->sw_if_index);
2845  s = format (s, "p %d w %d ", mp->priority, mp->weight);
2846 
2847  FINISH;
2848 }
2849 
2851  (vl_api_lisp_locator_set_dump_t * mp, void *handle)
2852 {
2853  u8 *s;
2854 
2855  s = format (0, "SCRIPT: lisp_locator_set_dump ");
2856  if (mp->filter == 1)
2857  s = format (s, "local");
2858  else if (mp->filter == 2)
2859  s = format (s, "remote");
2860 
2861  FINISH;
2862 }
2863 
2865  (vl_api_lisp_locator_dump_t * mp, void *handle)
2866 {
2867  u8 *s;
2868 
2869  s = format (0, "SCRIPT: lisp_locator_dump ");
2870  if (mp->is_index_set)
2871  s = format (s, "ls_index %d", (mp->ls_index));
2872  else
2873  s = format (s, "ls_name %s", mp->ls_name);
2874 
2875  FINISH;
2876 }
2877 
2879  (vl_api_lisp_map_request_mode_t * mp, void *handle)
2880 {
2881  u8 *s;
2882 
2883  s = format (0, "SCRIPT: lisp_map_request_mode ");
2884 
2885  s = mp->is_src_dst ? format (s, "src-dst") : format (s, "dst-only");
2886 
2887  FINISH;
2888 }
2889 
2891  (vl_api_lisp_eid_table_dump_t * mp, void *handle)
2892 {
2893  u8 *s;
2894 
2895  s = format (0, "SCRIPT: lisp_eid_table_dump ");
2896 
2897  if (mp->eid_set)
2898  {
2899  s = format (s, "vni %d ", (mp->vni));
2900  s = format (s, "eid %U ", format_lisp_flat_eid, &mp->eid);
2901  switch (mp->filter)
2902  {
2903  case 1:
2904  s = format (s, "local ");
2905  break;
2906  case 2:
2907  s = format (s, "remote ");
2908  break;
2909  default:
2910  break;
2911  }
2912  }
2913  FINISH;
2914 }
2915 
2918 {
2919  u8 *s;
2920 
2921  s = format (0, "SCRIPT: lisp_rloc_probe_enable_disable ");
2922  if (mp->is_enable)
2923  s = format (s, "enable");
2924  else
2925  s = format (s, "disable");
2926 
2927  FINISH;
2928 }
2929 
2932 {
2933  u8 *s;
2934 
2935  s = format (0, "SCRIPT: lisp_map_register_enable_disable ");
2936  if (mp->is_enable)
2937  s = format (s, "enable");
2938  else
2939  s = format (s, "disable");
2940 
2941  FINISH;
2942 }
2943 
2945  (vl_api_lisp_adjacencies_get_t * mp, void *handle)
2946 {
2947  u8 *s;
2948 
2949  s = format (0, "SCRIPT: lisp_adjacencies_get ");
2950  s = format (s, "vni %d", (mp->vni));
2951 
2952  FINISH;
2953 }
2954 
2957 {
2958  u8 *s;
2959 
2960  s = format (0, "SCRIPT: lisp_eid_table_map_dump ");
2961 
2962  if (mp->is_l2)
2963  s = format (s, "l2");
2964  else
2965  s = format (s, "l3");
2966 
2967  FINISH;
2968 }
2969 
2972 {
2973  u8 *s;
2974 
2975  s = format (0, "SCRIPT: ipsec_tunnel_if_add_del ");
2976 
2977  if (mp->esn)
2978  s = format (s, "esn");
2979  if (mp->anti_replay)
2980  s = format (s, "anti-replay");
2981  if (mp->udp_encap)
2982  s = format (s, "udp-encap");
2983 
2984  s = format (s, "local-ip %U ", format_vl_api_address, &mp->remote_ip);
2985 
2986  s = format (s, "remote-ip %U ", format_vl_api_address, &mp->local_ip);
2987  s = format (s, "tx-table-id %d ", (mp->tx_table_id));
2988 
2989  s = format (s, "local-spi %d ", (mp->local_spi));
2990 
2991  s = format (s, "remote-spi %d ", (mp->remote_spi));
2992 
2993  s = format (s, "local-crypto-key-len %d ", mp->local_crypto_key_len);
2994  s = format (s, "local-crypto-key %U ", format_hex_bytes,
2996  s = format (s, "remote-crypto-key-len %d ", mp->remote_crypto_key_len);
2997  s = format (s, "remote-crypto-key %U ", format_hex_bytes,
2999  s = format (s, "local-integ-key-len %d ", mp->local_integ_key_len);
3000  s = format (s, "local-integ-key %U ", format_hex_bytes,
3001  mp->local_integ_key, mp->local_integ_key_len, 0);
3002  s = format (s, "remote-integ-key-len %d ", mp->remote_integ_key_len);
3003  s = format (s, "remote-integ-key %U ", format_hex_bytes,
3005 
3006  if (mp->is_add == 0)
3007  s = format (s, "del ");
3008 
3009  FINISH;
3010 }
3011 
3012 static const char *policy_strs[] = {
3013  "BYPASS",
3014  "DISCARD",
3015  "RESOLVE",
3016  "PROTECT",
3017 };
3018 
3019 static const char *proto_strs[] = {
3020  "ESP",
3021  "AH",
3022 };
3023 
3024 static const char *algo_strs[] = {
3025  "NONE",
3026  "AES_CBC_128",
3027  "AES_CBC_192",
3028  "AES_CBC_256",
3029  "AES_CTR_128",
3030  "AES_CTR_192",
3031  "AES_CTR_256",
3032  "AES_GCM_128",
3033  "AES_GCM_192",
3034  "AES_GCM_256",
3035  "DES_CBC",
3036  "3DES_CBC",
3037 };
3038 
3039 
3040 static const char *integ_strs[] = {
3041  "NONE",
3042  "MD5_96",
3043  "SHA1_96",
3044  "SHA_256_96",
3045  "SHA_256_128",
3046  "SHA_384_192",
3047  "SHA_512_256",
3048 };
3049 
3052 {
3053  u8 *s;
3054  const char *str;
3055  vl_api_ipsec_spd_entry_t *ep;
3056  int policy_host_byte_order;
3057 
3058  ep = (vl_api_ipsec_spd_entry_t *) & mp->entry;
3059 
3060  s = format (0, "SCRIPT: ipsec_spd_entry ");
3061  s = format (s, "is_add %d spd_id %u priority %d is_outbound %d sa_id %u\n",
3062  mp->is_add,
3063  (ep->spd_id), ntohl (ep->priority), ep->is_outbound,
3064  (ep->sa_id));
3065 
3066  policy_host_byte_order = (ep->policy);
3067 
3068  if (policy_host_byte_order < ARRAY_LEN (policy_strs))
3069  str = policy_strs[policy_host_byte_order];
3070  else
3071  str = "BOGUS!";
3072 
3073  s = format (s, " policy: %s protocol %d\n", str, ep->protocol);
3074 
3075  s = format (s, " remote_address_start %U remote_address_stop %U\n",
3077  &ep->remote_address_start,
3078  format_vl_api_address, &ep->remote_address_stop);
3079 
3080  s = format (s, " local_address_start %U local_address_stop %U\n",
3082  &ep->local_address_start,
3083  format_vl_api_address, &ep->local_address_stop);
3084 
3085  s = format (s, " remote_port_start %d remote_port_stop %d\n",
3086  (ep->remote_port_start), ntohs (ep->remote_port_stop));
3087 
3088  s = format (s, " local_port_start %d local_port_stop %d ",
3089  (ep->local_port_start), ntohs (ep->local_port_stop));
3090 
3091  FINISH;
3092 }
3093 
3096 {
3097  u8 *s;
3098 
3099  s = format (0, "SCRIPT: ipsec_interface_add_del_spd ");
3100  s = format (s, "is_add %d sw_if_index %d spd_id %u ",
3101  mp->is_add, (mp->sw_if_index), ntohl (mp->spd_id));
3102  FINISH;
3103 }
3104 
3106  (vl_api_ipsec_spd_add_del_t * mp, void *handle)
3107 {
3108  u8 *s;
3109 
3110  s = format (0, "SCRIPT: ipsec_spd_add_del ");
3111  s = format (s, "spd_id %u is_add %d ", (mp->spd_id), mp->is_add);
3112  FINISH;
3113 }
3114 
3117 {
3118  u8 *s;
3119  int tmp;
3120  vl_api_ipsec_sad_entry_t *ep;
3121  const char *protocol_str, *algo_str, *integ_str;
3122 
3123  protocol_str = "BOGUS protocol!";
3124  algo_str = "BOGUS crypto_algorithm!";
3125  integ_str = "BOGUS integrity_algorithm!";
3126 
3127  ep = (vl_api_ipsec_sad_entry_t *) & mp->entry;
3128 
3129  s = format (0, "SCRIPT: ipsec_sad_entry_add_del is_add ", mp->is_add);
3130 
3131  tmp = (ep->protocol);
3132  if (tmp < ARRAY_LEN (proto_strs))
3133  protocol_str = proto_strs[tmp];
3134 
3135  tmp = (ep->crypto_algorithm);
3136  if (tmp < ARRAY_LEN (algo_strs))
3137  algo_str = algo_strs[tmp];
3138 
3139  tmp = (ep->integrity_algorithm);
3140  if (tmp < ARRAY_LEN (integ_strs))
3141  integ_str = integ_strs[tmp];
3142 
3143  s = format (s, "proto %s crypto alg %s integ alg %s\n",
3144  protocol_str, algo_str, integ_str);
3145  s = format (s, " crypto_key len %d value %U\n",
3146  ep->crypto_key.length, format_hex_bytes, ep->crypto_key.data,
3147  (int) (ep->crypto_key.length));
3148  s = format (s, " integ_key len %d value %U\n",
3149  ep->integrity_key.length, format_hex_bytes,
3150  ep->integrity_key.data, (int) (ep->integrity_key.length));
3151  s = format (s, " flags 0x%x ", (ep->flags));
3152 
3153  s = format (s, "tunnel_src %U tunnel_dst %U\n",
3155  &ep->tunnel_src, format_vl_api_address, &ep->tunnel_dst);
3156  s = format (s, " tx_table_id %u salt %u ",
3157  (ep->tx_table_id), ntohl (ep->salt));
3158  FINISH;
3159 }
3160 
3161 
3164 {
3165  u8 *s;
3166  u32 vtr_op = (mp->vtr_op);
3167 
3168  s = format (0, "SCRIPT: l2_interface_pbb_tag_rewrite ");
3169 
3170  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
3171  s = format (s, "vtr_op %d ", vtr_op);
3172  if (vtr_op != L2_VTR_DISABLED && vtr_op != L2_VTR_POP_2)
3173  {
3174  if (vtr_op == L2_VTR_TRANSLATE_2_2)
3175  s = format (s, "%d ", (mp->outer_tag));
3176  s = format (s, "dmac %U ", format_ethernet_address, &mp->b_dmac);
3177  s = format (s, "smac %U ", format_ethernet_address, &mp->b_smac);
3178  s = format (s, "sid %d ", (mp->i_sid));
3179  s = format (s, "vlanid %d ", (mp->b_vlanid));
3180  }
3181  FINISH;
3182 }
3183 
3186 {
3187  u8 *s;
3188 
3189  s = format (0, "SCRIPT: flow_classify_set_interface ");
3190  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
3191  if (mp->ip4_table_index != ~0)
3192  s = format (s, "ip4-table %d ", (mp->ip4_table_index));
3193  if (mp->ip6_table_index != ~0)
3194  s = format (s, "ip6-table %d ", (mp->ip6_table_index));
3195  if (mp->is_add == 0)
3196  s = format (s, "del ");
3197 
3198  FINISH;
3199 }
3200 
3201 static void *
3203 {
3204  u8 *s;
3205 
3206  s = format (0, "SCRIPT: punt ");
3207 
3208  switch (mp->punt.type)
3209  {
3210  case PUNT_API_TYPE_L4:
3211  s = format (s, "%U", format_vl_api_address_family, mp->punt.punt.l4.af);
3212 
3213  s = format (s, "protocol %d ", mp->punt.punt.l4.protocol);
3214 
3215  if (mp->punt.punt.l4.port != (u16) ~ 0)
3216  s = format (s, "port %d ", (mp->punt.punt.l4.port));
3217  break;
3218  default:
3219  break;
3220 
3221  }
3222 
3223  if (!mp->is_add)
3224  s = format (s, "del ");
3225 
3226  FINISH;
3227 }
3228 
3230  (vl_api_flow_classify_dump_t * mp, void *handle)
3231 {
3232  u8 *s;
3233 
3234  s = format (0, "SCRIPT: flow_classify_dump ");
3235  switch (mp->type)
3236  {
3238  s = format (s, "type ip4 ");
3239  break;
3241  s = format (s, "type ip6 ");
3242  break;
3243  default:
3244  break;
3245  }
3246 
3247  FINISH;
3248 }
3249 
3251  (vl_api_get_first_msg_id_t * mp, void *handle)
3252 {
3253  u8 *s;
3254 
3255  s = format (0, "SCRIPT: get_first_msg_id %s ", mp->name);
3256 
3257  FINISH;
3258 }
3259 
3260 static void *vl_api_ioam_enable_t_print
3261  (vl_api_ioam_enable_t * mp, void *handle)
3262 {
3263  u8 *s;
3264 
3265  s = format (0, "SCRIPT: ioam_enable ");
3266 
3267  if (mp->trace_enable)
3268  s = format (s, "trace enabled");
3269 
3270  if (mp->pot_enable)
3271  s = format (s, "POT enabled");
3272 
3273  if (mp->seqno)
3274  s = format (s, "Seqno enabled");
3275 
3276  if (mp->analyse)
3277  s = format (s, "Analyse enabled");
3278 
3279  FINISH;
3280 }
3281 
3282 static void *vl_api_ioam_disable_t_print
3283  (vl_api_ioam_disable_t * mp, void *handle)
3284 {
3285  u8 *s;
3286 
3287  s = format (0, "SCRIPT: ioam_disable ");
3288  s = format (s, "trace disabled");
3289  s = format (s, "POT disabled");
3290  s = format (s, "Seqno disabled");
3291  s = format (s, "Analyse disabled");
3292 
3293  FINISH;
3294 }
3295 
3297  (vl_api_feature_enable_disable_t * mp, void *handle)
3298 {
3299  u8 *s;
3300 
3301  s = format (0, "SCRIPT: feature_enable_disable ");
3302  s = format (s, "arc_name %s ", mp->arc_name);
3303  s = format (s, "feature_name %s ", mp->feature_name);
3304  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
3305  if (!mp->enable)
3306  s = format (s, "disable");
3307 
3308  FINISH;
3309 }
3310 
3313 {
3314  u8 *s;
3315 
3316  s = format (0, "SCRIPT: feature_gso_enable_disable ");
3317  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
3318  if (mp->enable_disable)
3319  s = format (s, "enable");
3320  if (!mp->enable_disable)
3321  s = format (s, "disable");
3322 
3323  FINISH;
3324 }
3325 
3328 {
3329  u8 *s;
3330 
3331  s = format (0, "SCRIPT: sw_interface_tag_add_del ");
3332  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
3333  if (mp->is_add)
3334  s = format (s, "tag %s ", mp->tag);
3335  else
3336  s = format (s, "del ");
3337 
3338  FINISH;
3339 }
3340 
3342  (vl_api_hw_interface_set_mtu_t * mp, void *handle)
3343 {
3344  u8 *s;
3345 
3346  s = format (0, "SCRIPT: sw_interface_set_mtu ");
3347  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
3348  s = format (s, "tag %d ", (mp->mtu));
3349 
3350  FINISH;
3351 }
3352 
3354  (vl_api_p2p_ethernet_add_t * mp, void *handle)
3355 {
3356  u8 *s;
3357 
3358  s = format (0, "SCRIPT: p2p_ethernet_add ");
3359  s = format (s, "sw_if_index %d ", (mp->parent_if_index));
3360  s = format (s, "remote_mac %U ", format_ethernet_address, mp->remote_mac);
3361 
3362  FINISH;
3363 }
3364 
3366  (vl_api_p2p_ethernet_del_t * mp, void *handle)
3367 {
3368  u8 *s;
3369 
3370  s = format (0, "SCRIPT: p2p_ethernet_del ");
3371  s = format (s, "sw_if_index %d ", (mp->parent_if_index));
3372  s = format (s, "remote_mac %U ", format_ethernet_address, mp->remote_mac);
3373 
3374  FINISH;
3375 }
3376 
3379 {
3380  u8 *s;
3381 
3382  s = format (0, "SCRIPT: tcp_configure_src_addresses ");
3383  s = format (s, "%U - %U ",
3386 
3387  if (mp->vrf_id)
3388  s = format (s, "vrf %d ", (mp->vrf_id));
3389 
3390  FINISH;
3391 }
3392 
3394  (vl_api_app_namespace_add_del_t * mp, void *handle)
3395 {
3396  u8 *s;
3397 
3398  s = format (0, "SCRIPT: app_namespace_add_del ");
3399  s = format (s, "ns-id %s secret %lu sw_if_index %d ipv4_fib_id %d "
3400  "ipv6_fib_id %d",
3402  mp->secret, (mp->sw_if_index), (mp->ip4_fib_id),
3403  (mp->ip6_fib_id));
3404  FINISH;
3405 }
3406 
3408  (vl_api_sw_interface_set_lldp_t * mp, void *handle)
3409 {
3410  u8 *s;
3411  u8 null_data[256];
3412 
3413  clib_memset (null_data, 0, sizeof (null_data));
3414 
3415  s = format (0, "SCRIPT: sw_interface_set_lldp ");
3416  s = format (s, "sw_if_index %d ", (mp->sw_if_index));
3417 
3418  if (memcmp (&mp->port_desc, null_data, sizeof (mp->port_desc)))
3419  s = format (s, "port_desc %s ", mp->port_desc);
3420 
3421  if (memcmp (mp->mgmt_ip4, null_data, sizeof (mp->mgmt_ip4)))
3422  s = format (s, "mgmt_ip4 %U ", format_ip4_address, mp->mgmt_ip4);
3423 
3424  if (memcmp (mp->mgmt_ip6, null_data, sizeof (mp->mgmt_ip6)))
3425  s = format (s, "mgmt_ip6 %U ", format_ip6_address, mp->mgmt_ip6);
3426 
3427  if (memcmp (mp->mgmt_oid, null_data, sizeof (mp->mgmt_oid)))
3428  s = format (s, "mgmt_oid %s ", mp->mgmt_oid);
3429 
3430  if (mp->enable == 0)
3431  s = format (s, "disable ");
3432 
3433  FINISH;
3434 }
3435 
3436 static void *vl_api_lldp_config_t_print
3437  (vl_api_lldp_config_t * mp, void *handle)
3438 {
3439  u8 *s;
3440 
3441  s = format (0, "SCRIPT: lldp_config ");
3442  s = format (s, "system_name %s ", mp->system_name);
3443  s = format (s, "tx_hold %d ", (mp->tx_hold));
3444  s = format (s, "tx_interval %d ", (mp->tx_interval));
3445  FINISH;
3446 }
3447 
3449  (vl_api_session_rule_add_del_t * mp, void *handle)
3450 {
3451  u8 *s;
3452  fib_prefix_t lcl, rmt;
3453  char *proto = mp->transport_proto == 0 ? "tcp" : "udp";
3454  s = format (0, "SCRIPT: session_rule_add_del ");
3455  mp->tag[sizeof (mp->tag) - 1] = 0;
3456  ip_prefix_decode (&mp->lcl, &lcl);
3457  ip_prefix_decode (&mp->rmt, &rmt);
3458 
3459  if (lcl.fp_proto == FIB_PROTOCOL_IP4)
3460  s = format (s, "appns %d scope %d %s %U/%d %d %U/%d %d action %u tag %s",
3461  mp->appns_index, mp->scope, proto, format_ip4_address,
3462  &lcl.fp_addr.ip4, lcl.fp_len,
3463  format_ip4_address, &rmt.fp_addr.ip4,
3464  rmt.fp_len, mp->action_index, mp->tag);
3465  else
3466  s = format (s, "appns %d scope %d %s %U/%d %d %U/%d %d action %u tag %s",
3467  mp->appns_index, mp->scope, proto, format_ip6_address,
3468  &lcl.fp_addr.ip6, lcl.fp_len,
3469  format_ip6_address, &rmt.fp_addr.ip6,
3470  rmt.fp_len, mp->action_index, mp->tag);
3471  FINISH;
3472 }
3473 
3474 __clib_unused
3477 {
3478  u8 *s;
3479  s = format (0, "SCRIPT: ip_container_proxy_add_del ");
3480  s = format (s, "is_add %d prefix %U sw_if_index %d",
3482 
3483  FINISH;
3484 }
3485 
3488 {
3489  u8 *s;
3490 
3491  s = format (0, "SCRIPT: qos_record_enable_disable ");
3492  s = format (s, "sw_if_index %d ", (mp->record.sw_if_index));
3493  s = format (s, "input_source %U ", format_qos_source,
3494  mp->record.input_source);
3495 
3496  if (!mp->enable)
3497  s = format (s, "disable ");
3498 
3499  FINISH;
3500 }
3501 
3502 #define foreach_no_print_function \
3503 _(memclnt_keepalive_reply)
3504 
3505 #define _(f) \
3506 static void * vl_api_ ## f ## _t_print \
3507  (vl_api_ ## f ## _t * mp, void * handle) \
3508 { \
3509  return handle; \
3510 }
3512 #undef _
3513 
3514 #define foreach_custom_print_no_arg_function \
3515 _(lisp_eid_table_vni_dump) \
3516 _(lisp_map_resolver_dump) \
3517 _(lisp_map_server_dump) \
3518 _(show_lisp_rloc_probe_state) \
3519 _(show_lisp_map_register_state) \
3520 _(show_lisp_map_request_mode)
3521 
3522 #define _(f) \
3523 static void * vl_api_ ## f ## _t_print \
3524  (vl_api_ ## f ## _t * mp, void * handle) \
3525 { \
3526  u8 * s; \
3527  s = format (0, "SCRIPT: " #f ); \
3528  FINISH; \
3529 }
3531 #undef _
3532 #define foreach_custom_print_function \
3533 _(CREATE_LOOPBACK, create_loopback) \
3534 _(CREATE_LOOPBACK_INSTANCE, create_loopback_instance) \
3535 _(SW_INTERFACE_SET_FLAGS, sw_interface_set_flags) \
3536 _(SW_INTERFACE_EVENT, sw_interface_event) \
3537 _(SW_INTERFACE_ADD_DEL_ADDRESS, sw_interface_add_del_address) \
3538 _(SW_INTERFACE_SET_TABLE, sw_interface_set_table) \
3539 _(SW_INTERFACE_SET_MPLS_ENABLE, sw_interface_set_mpls_enable) \
3540 _(SW_INTERFACE_SET_VPATH, sw_interface_set_vpath) \
3541 _(SW_INTERFACE_SET_VXLAN_BYPASS, sw_interface_set_vxlan_bypass) \
3542 _(SW_INTERFACE_SET_GENEVE_BYPASS, sw_interface_set_geneve_bypass) \
3543 _(BOND_CREATE, bond_create) \
3544 _(BOND_DELETE, bond_delete) \
3545 _(BOND_ENSLAVE, bond_enslave) \
3546 _(BOND_DETACH_SLAVE, bond_detach_slave) \
3547 _(SW_INTERFACE_SET_BOND_WEIGHT, sw_interface_set_bond_weight) \
3548 _(SW_INTERFACE_SLAVE_DUMP, sw_interface_slave_dump) \
3549 _(SW_INTERFACE_BOND_DUMP, sw_interface_bond_dump) \
3550 _(SW_INTERFACE_RX_PLACEMENT_DUMP, sw_interface_rx_placement_dump) \
3551 _(TAP_CREATE_V2, tap_create_v2) \
3552 _(TAP_DELETE_V2, tap_delete_v2) \
3553 _(SW_INTERFACE_TAP_V2_DUMP, sw_interface_tap_v2_dump) \
3554 _(IP_TABLE_ADD_DEL, ip_table_add_del) \
3555 _(MPLS_ROUTE_ADD_DEL, mpls_route_add_del) \
3556 _(MPLS_TABLE_ADD_DEL, mpls_table_add_del) \
3557 _(IP_ROUTE_ADD_DEL, ip_route_add_del) \
3558 _(MPLS_TUNNEL_ADD_DEL, mpls_tunnel_add_del) \
3559 _(SR_MPLS_POLICY_ADD, sr_mpls_policy_add) \
3560 _(SR_MPLS_POLICY_DEL, sr_mpls_policy_del) \
3561 _(SW_INTERFACE_SET_UNNUMBERED, sw_interface_set_unnumbered) \
3562 _(CREATE_VLAN_SUBIF, create_vlan_subif) \
3563 _(CREATE_SUBIF, create_subif) \
3564 _(IP_TABLE_REPLACE_BEGIN, ip_table_replace_begin) \
3565 _(IP_TABLE_FLUSH, ip_table_flush) \
3566 _(IP_TABLE_REPLACE_END, ip_table_replace_end) \
3567 _(SET_IP_FLOW_HASH, set_ip_flow_hash) \
3568 _(L2_PATCH_ADD_DEL, l2_patch_add_del) \
3569 _(SR_LOCALSID_ADD_DEL, sr_localsid_add_del) \
3570 _(SR_STEERING_ADD_DEL, sr_steering_add_del) \
3571 _(SR_POLICY_ADD, sr_policy_add) \
3572 _(SR_POLICY_MOD, sr_policy_mod) \
3573 _(SR_POLICY_DEL, sr_policy_del) \
3574 _(SW_INTERFACE_SET_L2_XCONNECT, sw_interface_set_l2_xconnect) \
3575 _(L2FIB_ADD_DEL, l2fib_add_del) \
3576 _(L2FIB_FLUSH_ALL, l2fib_flush_all) \
3577 _(L2FIB_FLUSH_BD, l2fib_flush_bd) \
3578 _(L2FIB_FLUSH_INT, l2fib_flush_int) \
3579 _(L2_FLAGS, l2_flags) \
3580 _(BRIDGE_FLAGS, bridge_flags) \
3581 _(CLASSIFY_ADD_DEL_TABLE, classify_add_del_table) \
3582 _(CLASSIFY_ADD_DEL_SESSION, classify_add_del_session) \
3583 _(SW_INTERFACE_SET_L2_BRIDGE, sw_interface_set_l2_bridge) \
3584 _(BRIDGE_DOMAIN_ADD_DEL, bridge_domain_add_del) \
3585 _(BRIDGE_DOMAIN_DUMP, bridge_domain_dump) \
3586 _(BRIDGE_DOMAIN_SET_MAC_AGE, bridge_domain_set_mac_age) \
3587 _(CLASSIFY_SET_INTERFACE_IP_TABLE, classify_set_interface_ip_table) \
3588 _(CLASSIFY_SET_INTERFACE_L2_TABLES, classify_set_interface_l2_tables) \
3589 _(ADD_NODE_NEXT, add_node_next) \
3590 _(L2TPV3_CREATE_TUNNEL, l2tpv3_create_tunnel) \
3591 _(L2TPV3_SET_TUNNEL_COOKIES, l2tpv3_set_tunnel_cookies) \
3592 _(L2TPV3_INTERFACE_ENABLE_DISABLE, l2tpv3_interface_enable_disable) \
3593 _(L2TPV3_SET_LOOKUP_KEY, l2tpv3_set_lookup_key) \
3594 _(SW_IF_L2TPV3_TUNNEL_DUMP, sw_if_l2tpv3_tunnel_dump) \
3595 _(VXLAN_ADD_DEL_TUNNEL, vxlan_add_del_tunnel) \
3596 _(VXLAN_TUNNEL_DUMP, vxlan_tunnel_dump) \
3597 _(VXLAN_OFFLOAD_RX, vxlan_offload_rx) \
3598 _(GENEVE_ADD_DEL_TUNNEL, geneve_add_del_tunnel) \
3599 _(GENEVE_TUNNEL_DUMP, geneve_tunnel_dump) \
3600 _(GRE_TUNNEL_ADD_DEL, gre_tunnel_add_del) \
3601 _(GRE_TUNNEL_DUMP, gre_tunnel_dump) \
3602 _(L2_FIB_CLEAR_TABLE, l2_fib_clear_table) \
3603 _(L2_INTERFACE_EFP_FILTER, l2_interface_efp_filter) \
3604 _(L2_INTERFACE_VLAN_TAG_REWRITE, l2_interface_vlan_tag_rewrite) \
3605 _(CREATE_VHOST_USER_IF, create_vhost_user_if) \
3606 _(MODIFY_VHOST_USER_IF, modify_vhost_user_if) \
3607 _(DELETE_VHOST_USER_IF, delete_vhost_user_if) \
3608 _(SW_INTERFACE_DUMP, sw_interface_dump) \
3609 _(CONTROL_PING, control_ping) \
3610 _(WANT_INTERFACE_EVENTS, want_interface_events) \
3611 _(CLI, cli) \
3612 _(CLI_INBAND, cli_inband) \
3613 _(MEMCLNT_CREATE, memclnt_create) \
3614 _(SOCKCLNT_CREATE, sockclnt_create) \
3615 _(SW_INTERFACE_VHOST_USER_DUMP, sw_interface_vhost_user_dump) \
3616 _(SHOW_VERSION, show_version) \
3617 _(L2_FIB_TABLE_DUMP, l2_fib_table_dump) \
3618 _(VXLAN_GPE_ADD_DEL_TUNNEL, vxlan_gpe_add_del_tunnel) \
3619 _(VXLAN_GPE_TUNNEL_DUMP, vxlan_gpe_tunnel_dump) \
3620 _(VXLAN_GBP_TUNNEL_ADD_DEL, vxlan_gbp_tunnel_add_del) \
3621 _(VXLAN_GBP_TUNNEL_DUMP, vxlan_gbp_tunnel_dump) \
3622 _(SW_INTERFACE_SET_VXLAN_GBP_BYPASS, sw_interface_set_vxlan_gbp_bypass) \
3623 _(INTERFACE_NAME_RENUMBER, interface_name_renumber) \
3624 _(WANT_L2_MACS_EVENTS, want_l2_macs_events) \
3625 _(INPUT_ACL_SET_INTERFACE, input_acl_set_interface) \
3626 _(IP_ADDRESS_DUMP, ip_address_dump) \
3627 _(IP_DUMP, ip_dump) \
3628 _(DELETE_LOOPBACK, delete_loopback) \
3629 _(BD_IP_MAC_ADD_DEL, bd_ip_mac_add_del) \
3630 _(BD_IP_MAC_FLUSH, bd_ip_mac_flush) \
3631 _(COP_INTERFACE_ENABLE_DISABLE, cop_interface_enable_disable) \
3632 _(COP_WHITELIST_ENABLE_DISABLE, cop_whitelist_enable_disable) \
3633 _(AF_PACKET_CREATE, af_packet_create) \
3634 _(AF_PACKET_DELETE, af_packet_delete) \
3635 _(AF_PACKET_DUMP, af_packet_dump) \
3636 _(SW_INTERFACE_CLEAR_STATS, sw_interface_clear_stats) \
3637 _(MPLS_TABLE_DUMP, mpls_table_dump) \
3638 _(MPLS_ROUTE_DUMP, mpls_route_dump) \
3639 _(MPLS_TUNNEL_DUMP, mpls_tunnel_dump) \
3640 _(CLASSIFY_TABLE_IDS,classify_table_ids) \
3641 _(CLASSIFY_TABLE_BY_INTERFACE, classify_table_by_interface) \
3642 _(CLASSIFY_TABLE_INFO,classify_table_info) \
3643 _(CLASSIFY_SESSION_DUMP,classify_session_dump) \
3644 _(SET_IPFIX_EXPORTER, set_ipfix_exporter) \
3645 _(IPFIX_EXPORTER_DUMP, ipfix_exporter_dump) \
3646 _(SET_IPFIX_CLASSIFY_STREAM, set_ipfix_classify_stream) \
3647 _(IPFIX_CLASSIFY_STREAM_DUMP, ipfix_classify_stream_dump) \
3648 _(IPFIX_CLASSIFY_TABLE_ADD_DEL, ipfix_classify_table_add_del) \
3649 _(IPFIX_CLASSIFY_TABLE_DUMP, ipfix_classify_table_dump) \
3650 _(SW_INTERFACE_SPAN_ENABLE_DISABLE, sw_interface_span_enable_disable) \
3651 _(SW_INTERFACE_SPAN_DUMP, sw_interface_span_dump) \
3652 _(GET_NEXT_INDEX, get_next_index) \
3653 _(PG_CREATE_INTERFACE,pg_create_interface) \
3654 _(PG_CAPTURE, pg_capture) \
3655 _(PG_ENABLE_DISABLE, pg_enable_disable) \
3656 _(POLICER_ADD_DEL, policer_add_del) \
3657 _(POLICER_DUMP, policer_dump) \
3658 _(POLICER_CLASSIFY_SET_INTERFACE, policer_classify_set_interface) \
3659 _(POLICER_CLASSIFY_DUMP, policer_classify_dump) \
3660 _(IP_SOURCE_AND_PORT_RANGE_CHECK_ADD_DEL, \
3661  ip_source_and_port_range_check_add_del) \
3662 _(IP_SOURCE_AND_PORT_RANGE_CHECK_INTERFACE_ADD_DEL, \
3663  ip_source_and_port_range_check_interface_add_del) \
3664 _(LISP_ENABLE_DISABLE, lisp_enable_disable) \
3665 _(GPE_ENABLE_DISABLE, gpe_enable_disable) \
3666 _(GPE_ADD_DEL_IFACE, gpe_add_del_iface) \
3667 _(LISP_PITR_SET_LOCATOR_SET, lisp_pitr_set_locator_set) \
3668 _(LISP_MAP_REQUEST_MODE, lisp_map_request_mode) \
3669 _(SHOW_LISP_MAP_REQUEST_MODE, show_lisp_map_request_mode) \
3670 _(LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping) \
3671 _(LISP_ADD_DEL_ADJACENCY, lisp_add_del_adjacency) \
3672 _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS, \
3673  lisp_add_del_map_request_itr_rlocs) \
3674 _(LISP_EID_TABLE_ADD_DEL_MAP, lisp_eid_table_add_del_map) \
3675 _(LISP_ADD_DEL_LOCAL_EID, lisp_add_del_local_eid) \
3676 _(GPE_ADD_DEL_FWD_ENTRY, gpe_add_del_fwd_entry) \
3677 _(LISP_ADD_DEL_LOCATOR_SET, lisp_add_del_locator_set) \
3678 _(LISP_ADD_DEL_MAP_RESOLVER, lisp_add_del_map_resolver) \
3679 _(LISP_ADD_DEL_LOCATOR, lisp_add_del_locator) \
3680 _(LISP_EID_TABLE_DUMP, lisp_eid_table_dump) \
3681 _(LISP_EID_TABLE_MAP_DUMP, lisp_eid_table_map_dump) \
3682 _(LISP_EID_TABLE_VNI_DUMP, lisp_eid_table_vni_dump) \
3683 _(LISP_MAP_RESOLVER_DUMP, lisp_map_resolver_dump) \
3684 _(LISP_MAP_SERVER_DUMP, lisp_map_server_dump) \
3685 _(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump) \
3686 _(LISP_LOCATOR_DUMP, lisp_locator_dump) \
3687 _(LISP_ADJACENCIES_GET, lisp_adjacencies_get) \
3688 _(SHOW_LISP_RLOC_PROBE_STATE, show_lisp_rloc_probe_state) \
3689 _(SHOW_LISP_MAP_REGISTER_STATE, show_lisp_map_register_state) \
3690 _(LISP_RLOC_PROBE_ENABLE_DISABLE, lisp_rloc_probe_enable_disable) \
3691 _(LISP_MAP_REGISTER_ENABLE_DISABLE, lisp_map_register_enable_disable) \
3692 _(IPSEC_INTERFACE_ADD_DEL_SPD, ipsec_interface_add_del_spd) \
3693 _(IPSEC_SAD_ENTRY_ADD_DEL, ipsec_sad_entry_add_del) \
3694 _(IPSEC_SPD_ADD_DEL, ipsec_spd_add_del) \
3695 _(IPSEC_SPD_ENTRY_ADD_DEL, ipsec_spd_entry_add_del) \
3696 _(IPSEC_TUNNEL_IF_ADD_DEL, ipsec_tunnel_if_add_del) \
3697 _(DELETE_SUBIF, delete_subif) \
3698 _(L2_INTERFACE_PBB_TAG_REWRITE, l2_interface_pbb_tag_rewrite) \
3699 _(SET_PUNT, set_punt) \
3700 _(FLOW_CLASSIFY_SET_INTERFACE, flow_classify_set_interface) \
3701 _(FLOW_CLASSIFY_DUMP, flow_classify_dump) \
3702 _(GET_FIRST_MSG_ID, get_first_msg_id) \
3703 _(IOAM_ENABLE, ioam_enable) \
3704 _(IOAM_DISABLE, ioam_disable) \
3705 _(IP_TABLE_DUMP, ip_table_dump) \
3706 _(IP_ROUTE_DUMP, ip_route_dump) \
3707 _(FEATURE_ENABLE_DISABLE, feature_enable_disable) \
3708 _(FEATURE_GSO_ENABLE_DISABLE, feature_gso_enable_disable) \
3709 _(SW_INTERFACE_TAG_ADD_DEL, sw_interface_tag_add_del) \
3710 _(HW_INTERFACE_SET_MTU, hw_interface_set_mtu) \
3711 _(P2P_ETHERNET_ADD, p2p_ethernet_add) \
3712 _(P2P_ETHERNET_DEL, p2p_ethernet_del) \
3713 _(TCP_CONFIGURE_SRC_ADDRESSES, tcp_configure_src_addresses) \
3714 _(APP_NAMESPACE_ADD_DEL, app_namespace_add_del) \
3715 _(LLDP_CONFIG, lldp_config) \
3716 _(SW_INTERFACE_SET_LLDP, sw_interface_set_lldp) \
3717 _(SESSION_RULE_ADD_DEL, session_rule_add_del) \
3718 _(OUTPUT_ACL_SET_INTERFACE, output_acl_set_interface) \
3719 _(QOS_RECORD_ENABLE_DISABLE, qos_record_enable_disable) \
3720 _(MEMCLNT_KEEPALIVE_REPLY, memclnt_keepalive_reply)
3721 
3722 void
3724 {
3725 #define _(n,f) am->msg_print_handlers[VL_API_##n] \
3726  = (void *) vl_api_##f##_t_print;
3728 #undef _
3729 }
3730 
3731 /*
3732  * fd.io coding-style-patch-verification: ON
3733  *
3734  * Local Variables:
3735  * eval: (c-set-style "gnu")
3736  * End:
3737  */
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
static void * vl_api_create_vhost_user_if_t_print(vl_api_create_vhost_user_if_t *mp, void *handle)
Definition: custom_dump.c:1725
static u8 * format_lisp_flat_eid(u8 *s, va_list *args)
Definition: custom_dump.c:2660
vl_api_interface_index_t sw_if_index
Definition: vxlan.api:58
fib_protocol_t fp_proto
protocol type
Definition: fib_types.h:212
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:867
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:1366
static void * vl_api_lisp_add_del_adjacency_t_print(vl_api_lisp_add_del_adjacency_t *mp, void *handle)
Definition: custom_dump.c:2711
Get list of policers.
Definition: policer.api:75
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:82
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:121
vl_api_mac_address_t b_smac
Definition: l2.api:416
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:2638
L2 FIB add entry request.
Definition: l2.api:130
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:1417
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:1478
static void * vl_api_vxlan_offload_rx_t_print(vl_api_vxlan_offload_rx_t *mp, void *handle)
Definition: custom_dump.c:1524
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:971
static void * vl_api_l2_patch_add_del_t_print(vl_api_l2_patch_add_del_t *mp, void *handle)
Definition: custom_dump.c:1057
vl_api_bond_mode_t mode
Definition: bond.api:63
static void * vl_api_lisp_locator_set_dump_t_print(vl_api_lisp_locator_set_dump_t *mp, void *handle)
Definition: custom_dump.c:2851
Create a point-to-point (p2p) Ethernet sub-interface.
static void * vl_api_lisp_map_request_mode_t_print(vl_api_lisp_map_request_mode_t *mp, void *handle)
Definition: custom_dump.c:2879
vl_api_l2t_lookup_key_t key
Definition: l2tp.api:108
enable/disable LISP RLOC probing
Definition: lisp.api:209
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:181
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:748
static __clib_unused void * vl_api_virtio_pci_delete_t_print(vl_api_virtio_pci_delete_t *mp, void *handle)
Definition: custom_dump.c:643
string node_name[64]
Definition: vpe.api:271
#define SR_STEER_IPV4
Definition: sr_mpls.h:41
bool is_add
Definition: ipsec.api:125
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:892
string cmd[]
Definition: vpe.api:94
#define SR_BEHAVIOR_X
Definition: sr.h:38
u8 * format_vl_api_fib_path(u8 *s, va_list *args)
Definition: fib_api.c:510
static void * vl_api_geneve_tunnel_dump_t_print(vl_api_geneve_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1632
Create or delete a VXLAN-GBP tunnel.
Definition: vxlan_gbp.api:53
a
Definition: bitmap.h:538
void ip_prefix_decode(const vl_api_prefix_t *in, fib_prefix_t *out)
Definition: ip_types_api.c:233
vl_api_sr_steer_t traffic_type
Definition: sr.api:165
vl_api_l2_port_type_t port_type
Definition: l2.api:484
static void * vl_api_lisp_add_del_locator_t_print(vl_api_lisp_add_del_locator_t *mp, void *handle)
Definition: custom_dump.c:2834
static void * vl_api_vxlan_gbp_tunnel_dump_t_print(vl_api_vxlan_gbp_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1572
static void * vl_api_cli_inband_t_print(vl_api_cli_inband_t *mp, void *handle)
Definition: custom_dump.c:1856
static void * vl_api_bond_enslave_t_print(vl_api_bond_enslave_t *mp, void *handle)
Definition: custom_dump.c:699
Interface set bond weight.
Definition: bond.api:199
vl_api_address_t client_address
Definition: l2tp.api:38
string next_name[64]
Definition: vpe.api:150
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:3261
vl_api_interface_index_t unnumbered_sw_if_index
Definition: interface.api:320
string node_name[64]
Definition: vpe.api:149
static void * vl_api_lisp_adjacencies_get_t_print(vl_api_lisp_adjacencies_get_t *mp, void *handle)
Definition: custom_dump.c:2945
Set/unset policer classify interface.
Definition: classify.api:145
Delete a point-to-point (p2p) Ethernet sub-interface.
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:3327
configure or disable LISP PITR node
Definition: lisp.api:137
Set flags on the interface.
Definition: interface.api:35
vl_api_sse2_qos_policer_type_t type
Definition: policer.api:50
static __clib_unused void * vl_api_virtio_pci_create_t_print(vl_api_virtio_pci_create_t *mp, void *handle)
Definition: custom_dump.c:620
bool is_add[default=true]
Definition: l2.api:434
Control ping from client to api server request.
Definition: vpe.api:59
bool mt_is_add[default=true]
Definition: mpls.api:58
vl_api_interface_index_t sw_if_index
Definition: vxlan_gpe.api:46
vl_api_interface_index_t sw_if_index
Definition: interface.api:457
static void * vl_api_flow_classify_set_interface_t_print(vl_api_flow_classify_set_interface_t *mp, void *handle)
Definition: custom_dump.c:3185
static void * vl_api_interface_name_renumber_t_print(vl_api_interface_name_renumber_t *mp, void *handle)
Definition: custom_dump.c:1960
vl_api_transport_proto_t transport_proto
Definition: session.api:268
static void * vl_api_add_node_next_t_print(vl_api_add_node_next_t *mp, void *handle)
Definition: custom_dump.c:1382
static void * vl_api_l2_fib_clear_table_t_print(vl_api_l2_fib_clear_table_t *mp, void *handle)
Definition: custom_dump.c:1683
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:71
static void * vl_api_sr_steering_add_del_t_print(vl_api_sr_steering_add_del_t *mp, void *handle)
Definition: custom_dump.c:1154
iOAM disable
Definition: ip.api:576
vl_api_interface_index_t sw_if_index
Definition: lisp.api:66
vl_api_interface_index_t sw_if_index
Definition: bond.api:89
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
vl_api_interface_index_t sw_if_index
Definition: l2.api:557
static void * vl_api_ip_table_dump_t_print(vl_api_ip_table_dump_t *mp, void *handle)
Definition: custom_dump.c:2317
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:2742
static __clib_unused void * vl_api_show_threads_t_print(vl_api_show_threads_t *mp, void *handle)
Definition: custom_dump.c:1901
Interface set vxlan-bypass request.
Definition: vxlan.api:81
add/del session rule
Definition: session.api:265
u8 * format_vl_api_address(u8 *s, va_list *args)
Definition: types.c:39
bool is_add[default=true]
Definition: vxlan.api:37
static void * vl_api_input_acl_set_interface_t_print(vl_api_input_acl_set_interface_t *mp, void *handle)
Definition: custom_dump.c:1989
vl_api_session_rule_scope_t scope
Definition: session.api:276
Set an interface&#39;s rx-placement Rx-Queue placement on specific thread is operational for only hardwar...
Definition: interface.api:437
VXLAN GPE definitions.
static void * vl_api_control_ping_t_print(vl_api_control_ping_t *mp, void *handle)
Definition: custom_dump.c:1825
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:840
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:2819
bool is_ipv6
Definition: ip.api:395
Classify add / del session request.
Definition: classify.api:119
IPFIX exporter dump request.
vl_api_interface_index_t sw_if_index
Definition: interface.api:498
#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:590
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
static void * vl_api_bridge_domain_dump_t_print(vl_api_bridge_domain_dump_t *mp, void *handle)
Definition: custom_dump.c:368
bool is_add[default=true]
Definition: l2.api:276
vl_api_address_t src
Definition: gre.api:54
vl_api_prefix_t prefix
Definition: sr.api:163
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:2956
vl_api_address_t nh_addr
Definition: sr.api:55
L2 bridge domain set mac age.
Definition: l2.api:242
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:1709
bool is_add[default=true]
Definition: l2.api:509
static void * vl_api_mpls_route_dump_t_print(vl_api_mpls_route_dump_t *mp, void *handle)
Definition: custom_dump.c:2307
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
Definition: vec.h:628
for(i=1;i<=collision_buckets;i++)
static void * vl_api_bond_create_t_print(vl_api_bond_create_t *mp, void *handle)
Definition: custom_dump.c:665
vl_api_interface_index_t sw_if_index
Definition: l2.api:412
vl_api_interface_index_t rx_sw_if_index
Definition: l2.api:482
static void * vl_api_flow_classify_dump_t_print(vl_api_flow_classify_dump_t *mp, void *handle)
Definition: custom_dump.c:3230
bool is_add[default=true]
Definition: lisp.api:64
vl_api_mac_address_t mac_address
Definition: interface.api:585
static void * vl_api_want_interface_events_t_print(vl_api_want_interface_events_t *mp, void *handle)
Definition: custom_dump.c:1835
static void * vl_api_sw_interface_clear_stats_t_print(vl_api_sw_interface_clear_stats_t *mp, void *handle)
Definition: custom_dump.c:2274
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:540
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
string stream_name[]
Definition: pg.api:81
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:715
bool is_add[default=true]
Definition: ip.api:56
u32 bd_id[default=0xffffffff]
Definition: l2.api:289
L2 bridge domain request operational state details.
Definition: l2.api:285
static void * vl_api_session_rule_add_del_t_print(vl_api_session_rule_add_del_t *mp, void *handle)
Definition: custom_dump.c:3449
static void * vl_api_output_acl_set_interface_t_print(vl_api_output_acl_set_interface_t *mp, void *handle)
Definition: custom_dump.c:2007
Enable / disable packet generator request.
Definition: pg.api:76
vl_api_interface_index_t mcast_sw_if_index
Definition: vxlan_gpe.api:27
static void * vl_api_classify_add_del_table_t_print(vl_api_classify_add_del_table_t *mp, void *handle)
Definition: custom_dump.c:1283
vhost-user interface create request
Definition: vhost_user.api:33
bool is_add[default=true]
Definition: lisp.api:324
vl_api_address_t remote_address
Definition: geneve.api:28
vl_api_mac_address_t mac_address
Definition: tapv2.api:73
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:1911
Dump details of all or just a single GRE tunnel.
Definition: gre.api:89
vl_api_interface_index_t sw_if_index
Definition: bond.api:171
vl_api_address_t src_address
Definition: vxlan.api:39
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:1435
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:359
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:351
vl_api_srv6_sid_list_t sids
Definition: sr.api:101
#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:2037
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:84
vl_api_interface_index_t sw_if_index[default=0xffffffff]
Definition: sr.api:52
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:921
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:2613
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:559
vl_api_ip6_address_t mgmt_ip6
Definition: lldp.api:54
static void * vl_api_sockclnt_create_t_print(vl_api_sockclnt_create_t *mp, void *handle)
Definition: custom_dump.c:1880
u8 max_macs_in_event[default=10]
Definition: l2.api:158
static void * vl_api_sr_policy_add_t_print(vl_api_sr_policy_add_t *mp, void *handle)
Definition: custom_dump.c:1192
Vhost-user interface dump request.
Definition: vhost_user.api:120
Dump tap interfaces request.
Definition: tapv2.api:126
vl_api_mac_address_t hw_addr
Definition: af_packet.api:33
add or delete LISP adjacency adjacency
Definition: lisp.api:320
static void * vl_api_p2p_ethernet_del_t_print(vl_api_p2p_ethernet_del_t *mp, void *handle)
Definition: custom_dump.c:3366
vl_api_interface_index_t parent_if_index
PacketGenerator capture packets on given interface request.
Definition: pg.api:60
vl_api_sse2_qos_action_t exceed_action
Definition: policer.api:53
vl_api_interface_index_t sw_if_index
Definition: interface.api:547
static void * vl_api_vxlan_gpe_tunnel_dump_t_print(vl_api_vxlan_gpe_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1948
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:2426
static void * vl_api_feature_gso_enable_disable_t_print(vl_api_feature_gso_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:3312
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:2917
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:329
static void * vl_api_memclnt_create_t_print(vl_api_memclnt_create_t *mp, void *handle)
Definition: custom_dump.c:1870
u32 spi
Definition: lisp_types.h:118
Interface set geneve-bypass request.
Definition: geneve.api:68
bool is_enable[default=true]
Definition: lisp_gpe.api:74
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:53
vl_api_srv6_sid_list_t sids
Definition: sr.api:77
static void * vl_api_l2tpv3_set_lookup_key_t_print(vl_api_l2tpv3_set_lookup_key_t *mp, void *handle)
Definition: custom_dump.c:1450
#define SR_BEHAVIOR_LAST
Definition: sr.h:48
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:2117
vl_api_interface_index_t sw_if_index
Definition: lldp.api:52
bool enable[default=true]
Definition: l2.api:450
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:655
Enable or disable interface feature gso arc.
Definition: gso.api:26
string system_name[]
Definition: lldp.api:35
vl_api_sr_policy_op_t operation
Definition: sr.api:98
Set interface source and L4 port-range request.
Definition: ip.api:526
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:807
static void * vl_api_mpls_route_add_del_t_print(vl_api_mpls_route_add_del_t *mp, void *handle)
Definition: custom_dump.c:776
vl_api_interface_index_t sw_if_index
Definition: interface.api:611
static void * vl_api_get_next_index_t_print(vl_api_get_next_index_t *mp, void *handle)
Definition: custom_dump.c:2506
u32 feature_bitmap
Definition: l2.api:221
vl_api_address_t local_ip
Definition: ipsec.api:350
add/del application namespace
Definition: session.api:217
static void * vl_api_ip_address_dump_t_print(vl_api_ip_address_dump_t *mp, void *handle)
Definition: custom_dump.c:2025
static void * vl_api_qos_record_enable_disable_t_print(vl_api_qos_record_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:3487
Aggregate type for a prefix.
Definition: fib_types.h:203
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:2219
vl_api_sr_behavior_t behavior
Definition: sr.api:51
L2 FIB flush bridge domain entries.
Definition: l2.api:100
bool is_add[default=true]
Definition: lisp.api:360
add or delete map request itr rlocs
Definition: lisp.api:336
static void * vl_api_cli_t_print(vl_api_cli_t *mp, void *handle)
Definition: custom_dump.c:1846
vl_api_ip_table_t table
Definition: ip.api:57
Delete host-interface.
Definition: af_packet.api:54
typedef eid
Definition: lisp_types.api:59
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:2413
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:2891
vl_api_interface_index_t interface_id
Definition: pg.api:36
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
u16 fp_len
The mask length.
Definition: fib_types.h:207
static void * vl_api_want_l2_macs_events_t_print(vl_api_want_l2_macs_events_t *mp, void *handle)
Definition: custom_dump.c:1974
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:1074
u16 tx_ring_sz[default=256]
Definition: tapv2.api:75
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:3051
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:80
vl_api_interface_index_t sw_if_index
Definition: vhost_user.api:89
static void * vl_api_sw_interface_set_unnumbered_t_print(vl_api_sw_interface_set_unnumbered_t *mp, void *handle)
Definition: custom_dump.c:904
u16 rx_ring_sz[default=256]
Definition: tapv2.api:76
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Decode/Encode for struct/union types.
Definition: ip_types_api.c:160
vl_api_mac_address_t mac
Definition: l2.api:134
static void * vl_api_tap_delete_v2_t_print(vl_api_tap_delete_v2_t *mp, void *handle)
Definition: custom_dump.c:598
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:2563
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:507
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
bool enable_disable[default=true]
Definition: l2.api:558
vl_api_hmac_key_t key
Definition: lisp.api:88
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:1584
vl_api_interface_index_t sw_if_index
Definition: l2.api:389
IPsec: Add/delete Security Association Database entry.
Definition: ipsec.api:191
string match_name[64]
Definition: policer.api:81
Set interface L2 flags (such as L2_LEARN, L2_FWD, L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM bits)...
Definition: l2.api:215
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:2779
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
vl_api_interface_index_t sw_if_index
Definition: l2.api:571
Enable/Disable span to mirror traffic from one interface to another.
Definition: span.api:37
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:2518
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
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
Definition: fib_types.h:226
static void * vl_api_sw_interface_set_lldp_t_print(vl_api_sw_interface_set_lldp_t *mp, void *handle)
Definition: custom_dump.c:3408
vl_api_ip_proto_t proto
Definition: acl_types.api:50
vl_api_address_t local_address
Definition: geneve.api:27
vl_api_interface_index_t sw_if_index
Definition: interface.api:333
static void * vl_api_af_packet_dump_t_print(vl_api_af_packet_dump_t *mp, void *handle)
Definition: custom_dump.c:2107
bool is_del[default=false]
Definition: sr.api:159
#define SR_BEHAVIOR_END
Definition: sr.h:37
set LISP map-request mode.
Definition: lisp.api:255
static void * vl_api_ip_table_replace_begin_t_print(vl_api_ip_table_replace_begin_t *mp, void *handle)
Definition: custom_dump.c:982
IPsec: Add/delete Security Policy Database.
Definition: ipsec.api:31
static void * vl_api_gre_tunnel_add_del_t_print(vl_api_gre_tunnel_add_del_t *mp, void *handle)
Definition: custom_dump.c:1644
static void * vl_api_geneve_add_del_tunnel_t_print(vl_api_geneve_add_del_tunnel_t *mp, void *handle)
Definition: custom_dump.c:1598
bool enable[default=true]
Definition: qos.api:113
bool enable_disable[default=true]
Definition: l2.api:159
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:2492
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:3116
Request for LISP adjacencies.
Definition: lisp.api:517
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: sr.api:164
vl_api_interface_index_t sw_if_index
Definition: interface.api:319
static u8 * format_nsh_address_vat(u8 *s, va_list *args)
Definition: custom_dump.c:2653
bool is_add[default=true]
Definition: ip.api:479
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
vl_api_lisp_locator_set_filter_t filter
Definition: lisp.api:487
vl_api_interface_index_t sw_if_index
Definition: ip.api:478
add or delete lisp eid-table
Definition: lisp.api:80
static void * vl_api_gre_tunnel_dump_t_print(vl_api_gre_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1671
MPLS Route Add / del route.
Definition: mpls.api:162
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:1316
static void * vl_api_bond_delete_t_print(vl_api_bond_delete_t *mp, void *handle)
Definition: custom_dump.c:688
static void * vl_api_p2p_ethernet_add_t_print(vl_api_p2p_ethernet_add_t *mp, void *handle)
Definition: custom_dump.c:3354
static void * vl_api_sw_interface_bond_dump_t_print(vl_api_sw_interface_bond_dump_t *mp, void *handle)
Definition: custom_dump.c:738
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:3476
u32 vl_api_string_len(vl_api_string_t *astr)
Definition: api_shared.c:1138
vl_api_interface_index_t sw_if_index_to
Definition: span.api:41
bool enable[default=true]
Definition: l2.api:486
static void * vl_api_cop_whitelist_enable_disable_t_print(vl_api_cop_whitelist_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2063
vl_api_interface_index_t sw_if_index
Definition: l2.api:116
static void * vl_api_ip_route_dump_t_print(vl_api_ip_route_dump_t *mp, void *handle)
Definition: custom_dump.c:2327
#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:2096
vl_api_address_t dst
Definition: gre.api:55
static void * vl_api_pg_enable_disable_t_print(vl_api_pg_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2547
Set or delete one or all ip addresses on a specified interface.
Definition: interface.api:220
vl_api_interface_index_t tx_sw_if_index
Definition: l2.api:449
Enable or Disable MPLS on and interface.
Definition: mpls.api:207
vl_api_interface_index_t sw_if_index
Definition: ipsec.api:55
vl_api_interface_index_t sw_if_index
Definition: interface.api:279
vl_api_mpls_route_t mr_route
Definition: mpls.api:168
vl_api_ip4_address_with_prefix_t host_ip4_prefix
Definition: tapv2.api:82
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:559
vl_api_interface_index_t sw_if_index
Definition: vxlan.api:102
static void * vl_api_af_packet_create_t_print(vl_api_af_packet_create_t *mp, void *handle)
Definition: custom_dump.c:2081
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
vl_api_interface_index_t sw_if_index
Definition: l2.api:219
string pcap_file_name[]
Definition: pg.api:67
vl_api_interface_index_t interface_id
Definition: pg.api:64
Classify table info.
Definition: classify.api:248
API main structure, used by both vpp and binary API clients.
Definition: api_common.h:226
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:523
string locator_set_name[64]
Definition: lisp.api:65
static void * vl_api_modify_vhost_user_if_t_print(vl_api_modify_vhost_user_if_t *mp, void *handle)
Definition: custom_dump.c:1751
static void * vl_api_classify_table_by_interface_t_print(vl_api_classify_table_by_interface_t *mp, void *handle)
Definition: custom_dump.c:2347
static void * vl_api_show_version_t_print(vl_api_show_version_t *mp, void *handle)
Definition: custom_dump.c:1890
static void * vl_api_set_ip_flow_hash_t_print(vl_api_set_ip_flow_hash_t *mp, void *handle)
Definition: custom_dump.c:1023
IPsec: Add/delete SPD from interface.
Definition: ipsec.api:49
Offload vxlan rx request.
Definition: vxlan.api:97
IPFIX classify stream configure request.
vl_api_interface_index_t sw_if_index
Definition: vxlan.api:85
static void * vl_api_lisp_locator_dump_t_print(vl_api_lisp_locator_dump_t *mp, void *handle)
Definition: custom_dump.c:2865
PacketGenerator create interface request.
Definition: pg.api:32
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:2789
Set the ip flow hash config for a fib request.
Definition: ip.api:232
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:248
enable or disable LISP feature
Definition: lisp.api:124
bool is_add[default=true]
Definition: lisp.api:115
format_function_t format_ip6_address
Definition: format.h:91
vl_api_mac_address_t remote_mac
vl_api_ip4_address_t mgmt_ip4
Definition: lldp.api:53
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:2144
bool is_enabled[default=true]
Definition: pg.api:65
vl_api_gre_tunnel_t tunnel
Definition: gre.api:69
sll srl srl sll sra u16x4 i
Definition: vector_sse42.h:317
static void * vl_api_gpe_enable_disable_t_print(vl_api_gpe_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2807
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:380
vl_api_ip6_address_t bsid_addr
Definition: sr.api:160
vl_api_ipsec_sad_entry_t entry
Definition: ipsec.api:196
static void * vl_api_cop_interface_enable_disable_t_print(vl_api_cop_interface_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2048
Set/unset the classification table for an interface request.
Definition: classify.api:372
vl_api_tap_flags_t tap_flags
Definition: tapv2.api:89
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:3163
static void * vl_api_bond_detach_slave_t_print(vl_api_bond_detach_slave_t *mp, void *handle)
Definition: custom_dump.c:727
static void * vl_api_policer_classify_dump_t_print(vl_api_policer_classify_dump_t *mp, void *handle)
Definition: custom_dump.c:2250
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:2931
SPAN dump request.
Definition: span.api:51
Create or delete a VXLAN tunnel.
Definition: vxlan.api:33
#define FINISH
Definition: custom_dump.c:67
vl_api_sse2_qos_action_t violate_action
Definition: policer.api:54
static void * vl_api_set_ipfix_exporter_t_print(vl_api_set_ipfix_exporter_t *mp, void *handle)
Definition: custom_dump.c:2383
Feature path enable/disable request.
Definition: feature.api:32
vl_api_interface_index_t tx_sw_if_index
Definition: l2.api:433
char * vl_api_from_api_to_new_c_string(vl_api_string_t *astr)
Definition: api_shared.c:1172
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:2585
IPv6 SR steering add/del.
Definition: sr.api:155
bool is_add
Definition: ipsec.api:195
add or delete map-resolver
Definition: lisp.api:111
Initialize a new tap interface with the given parameters.
Definition: tapv2.api:67
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:1273
vl_api_sse2_qos_action_t conform_action
Definition: policer.api:52
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:2757
static void * vl_api_hw_interface_set_mtu_t_print(vl_api_hw_interface_set_mtu_t *mp, void *handle)
Definition: custom_dump.c:3342
Delete sub interface request.
Definition: interface.api:544
#define ARRAY_LEN(x)
Definition: clib.h:66
vl_api_interface_index_t sw_if_index
Definition: bond.api:129
u8 scan_delay[default=10]
Definition: l2.api:157
void vl_msg_api_custom_dump_configure(api_main_t *am)
Definition: custom_dump.c:3723
Request for map lisp locator status.
Definition: lisp.api:373
static void * vl_api_lldp_config_t_print(vl_api_lldp_config_t *mp, void *handle)
Definition: custom_dump.c:3437
bool is_enabled[default=true]
Definition: pg.api:80
vl_api_interface_index_t rx_sw_if_index
Definition: l2.api:432
Delete loopback interface request.
Definition: interface.api:607
vl_api_ip6_address_t localsid
Definition: sr.api:49
Dump bridge domain IP to MAC entries.
Definition: l2.api:540
u8 si
Definition: lisp_types.h:119
vl_api_interface_index_t sw_if_index[default=0xffffffff]
Definition: session.api:221
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:2971
vl_api_interface_index_t sw_if_index
Definition: tapv2.api:120
bool enable[default=0xffffffff]
Definition: l2.api:572
vhost-user interface modify request
Definition: vhost_user.api:69
u32 segments[n_segments]
Definition: sr_mpls.api:38
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:444
bond detach slave
Definition: bond.api:125
vl_api_lisp_locator_set_filter_t filter
Definition: lisp.api:427
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:211
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:2436
vl_api_interface_index_t rx_sw_if_index
Definition: l2.api:448
static void * vl_api_ip_route_add_del_t_print(vl_api_ip_route_add_del_t *mp, void *handle)
Definition: custom_dump.c:759
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:3095
vl_api_interface_index_t sw_if_index
Definition: classify.api:416
vl_api_mpls_table_t mt_table
Definition: mpls.api:114
vl_api_interface_index_t sw_if_index
Definition: classify.api:377
bool enable[default=true]
Definition: vxlan.api:103
static void * vl_api_ioam_disable_t_print(vl_api_ioam_disable_t *mp, void *handle)
Definition: custom_dump.c:3283
bool is_add[default=true]
Definition: l2.api:137
static void * vl_api_create_subif_t_print(vl_api_create_subif_t *mp, void *handle)
Definition: custom_dump.c:947
vl_api_interface_index_t sw_if_index_from
Definition: span.api:40
vl_api_interface_index_t sw_if_index
Definition: gre.api:93
Request for eid table summary status.
Definition: lisp.api:479
vl_api_bond_lb_algo_t lb
Definition: bond.api:64
enable/disable LISP map-register
Definition: lisp.api:221
vl_api_qos_record_t record
Definition: qos.api:114
Request for locator_set summary status.
Definition: lisp.api:423
Get list of policer classify interfaces and tables.
Definition: classify.api:170
Reply for lisp_add_del_map_request_itr_rlocs.
Definition: lisp.api:356
static void * vl_api_vxlan_add_del_tunnel_t_print(vl_api_vxlan_add_del_tunnel_t *mp, void *handle)
Definition: custom_dump.c:1488
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:152
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:3202
#define foreach_create_subif_flag
Definition: custom_dump.c:936
vl_api_interface_index_t hw_if_index
Definition: vxlan.api:101
IPv6 SR policy deletion.
Definition: sr.api:110
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:609
Set the next node for a given node request.
Definition: vpe.api:145
vl_api_interface_index_t sw_if_index
Definition: vxlan_gbp.api:92
vl_api_interface_index_t sw_if_index
Definition: interface.api:441
Query relative index via node names.
Definition: vpe.api:267
static void * vl_api_classify_session_dump_t_print(vl_api_classify_session_dump_t *mp, void *handle)
Definition: custom_dump.c:2371
show version
Definition: vpe.api:169
add or delete locator_set
Definition: lisp.api:29
MPLS SR policy add.
Definition: sr_mpls.api:30
string host_namespace[64]
Definition: tapv2.api:91
static void * vl_api_get_first_msg_id_t_print(vl_api_get_first_msg_id_t *mp, void *handle)
Definition: custom_dump.c:3251
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:2624
#define foreach_custom_print_function
Definition: custom_dump.c:3532
vl_api_interface_index_t sw_if_index
Definition: interface.api:490
static void * vl_api_ip_table_replace_end_t_print(vl_api_ip_table_replace_end_t *mp, void *handle)
Definition: custom_dump.c:1009
vl_api_interface_index_t sw_if_index
Definition: classify.api:329
bool is_add[default=true]
Definition: lisp.api:141
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:2727
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
vl_api_address_t ip_address
Definition: lisp.api:116
static void * vl_api_sr_policy_mod_t_print(vl_api_sr_policy_mod_t *mp, void *handle)
Definition: custom_dump.c:1234
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
bool is_add[default=true]
Definition: lisp.api:84
MPLS SR policy deletion.
Definition: sr_mpls.api:70
IPv6 SR policy add.
Definition: sr.api:68
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:126
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:1350
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:2337
u8 num_rx_queues[default=1]
Definition: tapv2.api:74
Interface bridge mode request.
Definition: l2.api:478
vl_api_interface_index_t sw_if_index
Definition: l2.api:136
bool is_add[default=true]
Definition: lisp_gpe.api:86
static void * vl_api_l2_interface_efp_filter_t_print(vl_api_l2_interface_efp_filter_t *mp, void *handle)
Definition: custom_dump.c:1693
Create loopback interface instance request.
Definition: interface.api:581
vl_api_interface_index_t sw_if_index[default=0xffffffff]
Definition: mpls.api:84
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:80
vl_api_interface_index_t bond_sw_if_index
Definition: bond.api:105
Add or delete a single GRE tunnel.
Definition: gre.api:64
vl_api_sse2_qos_round_type_t round_type
Definition: policer.api:49
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:2531
vl_api_bd_flags_t flags
Definition: l2.api:361
vl_api_mac_event_action_t action
Definition: l2.api:181
Set interface physical MTU.
Definition: interface.api:49
vl_api_interface_index_t sw_if_index
Definition: vhost_user.api:73
add or delete GPE tunnel
Definition: lisp_gpe.api:44
u32 id[default=0xFFFFFFFF]
Definition: bond.api:60
static void * vl_api_delete_vhost_user_if_t_print(vl_api_delete_vhost_user_if_t *mp, void *handle)
Definition: custom_dump.c:1772
add or delete locator for locator_set
Definition: lisp.api:60
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:2683
#define foreach_no_print_function
Definition: custom_dump.c:3502
L2 interface ethernet flow point filtering enable/disable request.
Definition: l2.api:553
vl_api_sse2_qos_rate_type_t rate_type
Definition: policer.api:48
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
string next_name[64]
Definition: vpe.api:272
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:2450
Interface set LLDP request.
Definition: lldp.api:48
Delete tap interface.
Definition: tapv2.api:116
vl_api_ip6_address_t bsid_addr
Definition: sr.api:95
static void * vl_api_ip_table_flush_t_print(vl_api_ip_table_flush_t *mp, void *handle)
Definition: custom_dump.c:996
u32 hit_next_index[default=0xffffffff]
Definition: classify.api:125
Create loopback interface request.
Definition: interface.api:555
vl_api_mac_address_t b_dmac
Definition: l2.api:415
Set unnumbered interface add / del request.
Definition: interface.api:315
add or delete remote static mapping
Definition: lisp.api:297
Segment Routing MPLS data structures definitions.
L2 interface vlan tag rewrite configure request.
Definition: l2.api:385
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:519
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:2297
bool mt_is_add[default=true]
Definition: mpls.api:113
static void * vl_api_mpls_table_add_del_t_print(vl_api_mpls_table_add_del_t *mp, void *handle)
Definition: custom_dump.c:825
L2 interface patch add / del request.
Definition: l2.api:428
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
bool enable[default=true]
Definition: lldp.api:56
dump the rx queue placement of interface(s)
Definition: interface.api:453
Interface set vpath request.
Definition: l2.api:567
static void * vl_api_ipfix_exporter_dump_t_print(vl_api_ipfix_exporter_dump_t *mp, void *handle)
Definition: custom_dump.c:2403
configure global parameter for LLDP
Definition: lldp.api:29
Add/del policer.
Definition: policer.api:37
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:2286
L2 interface pbb tag rewrite configure request.
Definition: l2.api:408
static void * vl_api_l2_fib_table_dump_t_print(vl_api_l2_fib_table_dump_t *mp, void *handle)
Definition: custom_dump.c:1813
vl_api_if_status_flags_t flags
Definition: interface.api:40
bool is_enable[default=true]
Definition: lisp.api:128
u32 learn_limit[default=1000]
Definition: l2.api:156
static void * vl_api_ipsec_spd_add_del_t_print(vl_api_ipsec_spd_add_del_t *mp, void *handle)
Definition: custom_dump.c:3106
IPv6 SR policy modification.
Definition: sr.api:91
static void * vl_api_sw_interface_dump_t_print(vl_api_sw_interface_dump_t *mp, void *handle)
Definition: custom_dump.c:1794
#define vec_foreach(var, vec)
Vector iterator.
Set bridge flags request.
Definition: l2.api:355
unsigned long long u32x4
Definition: ixge.c:28
vl_api_interface_index_t sw_if_index[default=0xffffffff]
Definition: vxlan_gbp.api:72
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:1550
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:510
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:85
#define SR_STEER_L2
Definition: sr.h:50
vl_api_mpls_tunnel_t mt_tunnel
Definition: mpls.api:59
static void * vl_api_l2tpv3_create_tunnel_t_print(vl_api_l2tpv3_create_tunnel_t *mp, void *handle)
Definition: custom_dump.c:1394
Set / clear software interface tag.
Definition: interface.api:343
vl_api_ip6_address_t bsid_addr
Definition: sr.api:72
string host_if_name[64]
Definition: tapv2.api:93
Dump MPLS fib table.
Definition: mpls.api:120
static void * vl_api_tcp_configure_src_addresses_t_print(vl_api_tcp_configure_src_addresses_t *mp, void *handle)
Definition: custom_dump.c:3378
l2tpv3 tunnel interface create request
Definition: l2tp.api:34
IPv6 SR LocalSID add/del request.
Definition: sr.api:44
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:2460
#define foreach_custom_print_no_arg_function
Definition: custom_dump.c:3514
Associate the specified interface with a fib table.
Definition: interface.api:275
static void * vl_api_feature_enable_disable_t_print(vl_api_feature_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:3297
bool is_add[default=true]
Definition: lisp.api:33
static void * vl_api_app_namespace_add_del_t_print(vl_api_app_namespace_add_del_t *mp, void *handle)
Definition: custom_dump.c:3394
Flush bridge domain IP to MAC entries.
Definition: l2.api:517
vl_api_interface_index_t sw_if_index
Definition: bond.api:203
u8 * vl_api_from_api_to_new_vec(void *mp, vl_api_string_t *astr)
Definition: api_shared.c:1156
vl_api_interface_index_t mcast_sw_if_index
Definition: vxlan.api:41
Add or delete IPsec tunnel interface.
Definition: ipsec.api:344
vl_api_interface_index_t sw_if_index[default=0xffffffff]
Definition: vhost_user.api:124
IPFIX add or delete classifier table request.
string host_bridge[64]
Definition: tapv2.api:95
format_function_t format_vlib_pci_addr
Definition: pci.h:324
enable or disable gpe protocol
Definition: lisp_gpe.api:70
static void * vl_api_policer_classify_set_interface_t_print(vl_api_policer_classify_set_interface_t *mp, void *handle)
Definition: custom_dump.c:2231
static void * vl_api_vxlan_tunnel_dump_t_print(vl_api_vxlan_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1538
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:348
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:1783
static void * vl_api_classify_table_info_t_print(vl_api_classify_table_info_t *mp, void *handle)
Definition: custom_dump.c:2359
vl_api_address_t dst_address
Definition: vxlan.api:40
vl_api_ip6_address_with_prefix_t host_ip6_prefix
Definition: tapv2.api:84
L2 bridge domain add or delete request.
Definition: l2.api:263
show_threads display the information about vpp threads running on system along with their process id...
Definition: vpe.api:197