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