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