FD.io VPP  v19.08-24-ge6a5712
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 (memcmp (mp->mac_address, null_mac, 6))
555  s = format (s, "mac-address %U ",
557  if (memcmp (mp->host_mac_addr, null_mac, 6))
558  s = format (s, "host-mac-addr %U ",
560  if (mp->host_if_name_set)
561  s = format (s, "host-if-name %s ", mp->host_if_name);
562  if (mp->host_namespace_set)
563  s = format (s, "host-ns %s ", mp->host_namespace);
564  if (mp->host_bridge_set)
565  s = format (s, "host-bridge %s ", mp->host_bridge);
566  if (mp->host_ip4_addr_set)
567  s = format (s, "host-ip4-addr %U/%d ", format_ip4_address,
569  if (mp->host_ip6_addr_set)
570  s = format (s, "host-ip6-addr %U/%d ", format_ip6_address,
572  if (mp->host_ip4_gw_set)
573  s = format (s, "host-ip4-gw %U ", format_ip4_address, mp->host_ip4_addr);
574  if (mp->host_ip6_gw_set)
575  s = format (s, "host-ip6-gw %U ", format_ip6_address, mp->host_ip6_addr);
576  if (mp->tx_ring_sz)
577  s = format (s, "tx-ring-size %u ", ntohs (mp->tx_ring_sz));
578  if (mp->rx_ring_sz)
579  s = format (s, "rx-ring-size %u ", ntohs (mp->rx_ring_sz));
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, mp->mode);
666  if (mp->lb)
667  s = format (s, "lb %U ", format_bond_load_balance, 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 ", mp->bond_sw_if_index);
693  s = format (s, "sw_if_index %u ", 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  s = format (s, "name_filter %s ", mp->name_filter);
1978  else
1979  s = format (s, "all ");
1980 
1981  FINISH;
1982 }
1983 
1985  (vl_api_l2_fib_table_dump_t * mp, void *handle)
1986 {
1987  u8 *s;
1988 
1989  s = format (0, "SCRIPT: l2_fib_table_dump ");
1990 
1991  s = format (s, "bd_id %d ", ntohl (mp->bd_id));
1992 
1993  FINISH;
1994 }
1995 
1996 static void *vl_api_control_ping_t_print
1997  (vl_api_control_ping_t * mp, void *handle)
1998 {
1999  u8 *s;
2000 
2001  s = format (0, "SCRIPT: control_ping ");
2002 
2003  FINISH;
2004 }
2005 
2007  (vl_api_want_interface_events_t * mp, void *handle)
2008 {
2009  u8 *s;
2010 
2011  s = format (0, "SCRIPT: want_interface_events pid %d enable %d ",
2012  ntohl (mp->pid), ntohl (mp->enable_disable));
2013 
2014  FINISH;
2015 }
2016 
2017 static void *
2018 vl_api_cli_t_print (vl_api_cli_t * mp, void *handle)
2019 {
2020  u8 *s;
2021 
2022  s = format (0, "SCRIPT: cli ");
2023 
2024  FINISH;
2025 }
2026 
2027 static void *vl_api_cli_inband_t_print
2028  (vl_api_cli_inband_t * mp, void *handle)
2029 {
2030  u8 *s;
2031  u8 *cmd = 0;
2032  u32 length = vl_api_string_len (&mp->cmd);
2033 
2034  vec_validate (cmd, length);
2035  clib_memcpy (cmd, vl_api_from_api_string (&mp->cmd), length);
2036 
2037  s = format (0, "SCRIPT: exec %v ", cmd);
2038 
2039  vec_free (cmd);
2040  FINISH;
2041 }
2042 
2043 static void *vl_api_memclnt_create_t_print
2044  (vl_api_memclnt_create_t * mp, void *handle)
2045 {
2046  u8 *s;
2047 
2048  s = format (0, "SCRIPT: memclnt_create name %s ", mp->name);
2049 
2050  FINISH;
2051 }
2052 
2053 static void *vl_api_sockclnt_create_t_print
2054  (vl_api_sockclnt_create_t * mp, void *handle)
2055 {
2056  u8 *s;
2057 
2058  s = format (0, "SCRIPT: sockclnt_create name %s ", mp->name);
2059 
2060  FINISH;
2061 }
2062 
2063 static void *vl_api_show_version_t_print
2064  (vl_api_show_version_t * mp, void *handle)
2065 {
2066  u8 *s;
2067 
2068  s = format (0, "SCRIPT: show_version ");
2069 
2070  FINISH;
2071 }
2072 
2073 __clib_unused
2074  static void *vl_api_show_threads_t_print
2075  (vl_api_show_threads_t * mp, void *handle)
2076 {
2077  u8 *s;
2078 
2079  s = format (0, "SCRIPT: show_threads ");
2080 
2081  FINISH;
2082 }
2083 
2086 {
2087  u8 *s;
2088 
2089  s = format (0, "SCRIPT: vxlan_gpe_add_del_tunnel ");
2090 
2091  ip46_address_t local = to_ip46 (mp->is_ipv6, mp->local);
2092  ip46_address_t remote = to_ip46 (mp->is_ipv6, mp->remote);
2093 
2094  u8 is_grp = ip46_address_is_multicast (&remote);
2095  char *remote_name = is_grp ? "group" : "remote";
2096 
2097  s = format (s, "local %U ", format_ip46_address, &local, IP46_TYPE_ANY);
2098  s = format (s, "%s %U ", remote_name, format_ip46_address,
2099  &remote, IP46_TYPE_ANY);
2100 
2101  if (is_grp)
2102  s = format (s, "mcast_sw_if_index %d ", ntohl (mp->mcast_sw_if_index));
2103  s = format (s, "protocol %d ", ntohl (mp->protocol));
2104 
2105  s = format (s, "vni %d ", ntohl (mp->vni));
2106 
2107  if (mp->is_add == 0)
2108  s = format (s, "del ");
2109 
2110  if (mp->encap_vrf_id)
2111  s = format (s, "encap-vrf-id %d ", ntohl (mp->encap_vrf_id));
2112 
2113  if (mp->decap_vrf_id)
2114  s = format (s, "decap-vrf-id %d ", ntohl (mp->decap_vrf_id));
2115 
2116  FINISH;
2117 }
2118 
2120  (vl_api_vxlan_gpe_tunnel_dump_t * mp, void *handle)
2121 {
2122  u8 *s;
2123 
2124  s = format (0, "SCRIPT: vxlan_gpe_tunnel_dump ");
2125 
2126  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2127 
2128  FINISH;
2129 }
2130 
2133 {
2134  u8 *s;
2135 
2136  s = format (0, "SCRIPT: interface_renumber ");
2137 
2138  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2139 
2140  s = format (s, "new_show_dev_instance %d ",
2141  ntohl (mp->new_show_dev_instance));
2142 
2143  FINISH;
2144 }
2145 
2147  (vl_api_ip_probe_neighbor_t * mp, void *handle)
2148 {
2149  u8 *s;
2150 
2151  s = format (0, "SCRIPT: ip_probe_neighbor ");
2152  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2153  s = format (s, "address %U ", format_vl_api_address, &mp->dst);
2154 
2155  FINISH;
2156 }
2157 
2160 {
2161  u8 *s;
2162 
2163  s = format (0, "SCRIPT: ip_scan_neighbor_enable_disable ");
2164 
2165  switch (mp->mode)
2166  {
2167  case IP_SCAN_V4_NEIGHBORS:
2168  s = format (s, "ip4 ");
2169  break;
2170  case IP_SCAN_V6_NEIGHBORS:
2171  s = format (s, "ip6 ");
2172  break;
2173  case IP_SCAN_V46_NEIGHBORS:
2174  s = format (s, "both ");
2175  break;
2176  default:
2177  s = format (s, "disable ");
2178  }
2179 
2180  s = format (s, "interval %d ", mp->scan_interval);
2181  s = format (s, "max-time %d ", mp->max_proc_time);
2182  s = format (s, "max-update %d ", mp->max_update);
2183  s = format (s, "delay %d ", mp->scan_int_delay);
2184  s = format (s, "stale %d ", mp->stale_threshold);
2185 
2186  FINISH;
2187 }
2188 
2190  (vl_api_want_ip4_arp_events_t * mp, void *handle)
2191 {
2192  u8 *s;
2193 
2194  s = format (0, "SCRIPT: want_ip4_arp_events ");
2195  s = format (s, "pid %d address %U ", ntohl (mp->pid),
2196  format_ip4_address, mp->ip);
2197  if (mp->enable_disable == 0)
2198  s = format (s, "del ");
2199 
2200  FINISH;
2201 }
2202 
2204  (vl_api_want_ip6_nd_events_t * mp, void *handle)
2205 {
2206  u8 *s;
2207 
2208  s = format (0, "SCRIPT: want_ip6_nd_events ");
2209  s = format (s, "pid %d address %U ", ntohl (mp->pid),
2211  if (mp->enable_disable == 0)
2212  s = format (s, "del ");
2213 
2214  FINISH;
2215 }
2216 
2218  (vl_api_want_l2_macs_events_t * mp, void *handle)
2219 {
2220  u8 *s;
2221 
2222  s = format (0, "SCRIPT: want_l2_macs_events ");
2223  s = format (s, "learn-limit %d ", ntohl (mp->learn_limit));
2224  s = format (s, "scan-delay %d ", (u32) mp->scan_delay);
2225  s = format (s, "max-entries %d ", (u32) mp->max_macs_in_event * 10);
2226  if (mp->enable_disable == 0)
2227  s = format (s, "disable");
2228 
2229  FINISH;
2230 }
2231 
2234 {
2235  u8 *s;
2236 
2237  s = format (0, "SCRIPT: input_acl_set_interface ");
2238 
2239  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2240  s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index));
2241  s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index));
2242  s = format (s, "l2-table %d ", ntohl (mp->l2_table_index));
2243 
2244  if (mp->is_add == 0)
2245  s = format (s, "del ");
2246 
2247  FINISH;
2248 }
2249 
2252 {
2253  u8 *s;
2254 
2255  s = format (0, "SCRIPT: output_acl_set_interface ");
2256 
2257  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2258  s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index));
2259  s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index));
2260  s = format (s, "l2-table %d ", ntohl (mp->l2_table_index));
2261 
2262  if (mp->is_add == 0)
2263  s = format (s, "del ");
2264 
2265  FINISH;
2266 }
2267 
2268 static void *vl_api_ip_address_dump_t_print
2269  (vl_api_ip_address_dump_t * mp, void *handle)
2270 {
2271  u8 *s;
2272 
2273  s = format (0, "SCRIPT: ip6_address_dump ");
2274  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2275  s = format (s, "is_ipv6 %d ", mp->is_ipv6 != 0);
2276 
2277  FINISH;
2278 }
2279 
2280 static void *
2282 {
2283  u8 *s;
2284 
2285  s = format (0, "SCRIPT: ip_dump ");
2286  s = format (s, "is_ipv6 %d ", mp->is_ipv6 != 0);
2287 
2288  FINISH;
2289 }
2290 
2293 {
2294  u8 *s;
2295 
2296  s = format (0, "SCRIPT: cop_interface_enable_disable ");
2297  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2298  if (mp->enable_disable)
2299  s = format (s, "enable ");
2300  else
2301  s = format (s, "disable ");
2302 
2303  FINISH;
2304 }
2305 
2308 {
2309  u8 *s;
2310 
2311  s = format (0, "SCRIPT: cop_whitelist_enable_disable ");
2312  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2313  s = format (s, "fib-id %d ", ntohl (mp->fib_id));
2314  if (mp->ip4)
2315  s = format (s, "ip4 ");
2316  if (mp->ip6)
2317  s = format (s, "ip6 ");
2318  if (mp->default_cop)
2319  s = format (s, "default ");
2320 
2321  FINISH;
2322 }
2323 
2325  (vl_api_af_packet_create_t * mp, void *handle)
2326 {
2327  u8 *s;
2328 
2329  s = format (0, "SCRIPT: af_packet_create ");
2330  s = format (s, "host_if_name %s ", mp->host_if_name);
2331  if (mp->use_random_hw_addr)
2332  s = format (s, "hw_addr random ");
2333  else
2334  s = format (s, "hw_addr %U ", format_ethernet_address, mp->hw_addr);
2335 
2336  FINISH;
2337 }
2338 
2340  (vl_api_af_packet_delete_t * mp, void *handle)
2341 {
2342  u8 *s;
2343 
2344  s = format (0, "SCRIPT: af_packet_delete ");
2345  s = format (s, "host_if_name %s ", mp->host_if_name);
2346 
2347  FINISH;
2348 }
2349 
2350 static void *vl_api_af_packet_dump_t_print
2351  (vl_api_af_packet_dump_t * mp, void *handle)
2352 {
2353  u8 *s;
2354 
2355  s = format (0, "SCRIPT: af_packet_dump ");
2356 
2357  FINISH;
2358 }
2359 
2360 static u8 *
2361 format_policer_action (u8 * s, va_list * va)
2362 {
2363  u32 action = va_arg (*va, u32);
2364  u32 dscp = va_arg (*va, u32);
2365  char *t = 0;
2366 
2367  if (action == SSE2_QOS_ACTION_DROP)
2368  s = format (s, "drop");
2369  else if (action == SSE2_QOS_ACTION_TRANSMIT)
2370  s = format (s, "transmit");
2371  else if (action == SSE2_QOS_ACTION_MARK_AND_TRANSMIT)
2372  {
2373  s = format (s, "mark-and-transmit ");
2374  switch (dscp)
2375  {
2376 #define _(v,f,str) case VNET_DSCP_##f: t = str; break;
2378 #undef _
2379  default:
2380  break;
2381  }
2382  s = format (s, "%s", t);
2383  }
2384  return s;
2385 }
2386 
2387 static void *vl_api_policer_add_del_t_print
2388  (vl_api_policer_add_del_t * mp, void *handle)
2389 {
2390  u8 *s;
2391 
2392  s = format (0, "SCRIPT: policer_add_del ");
2393  s = format (s, "name %s ", mp->name);
2394  s = format (s, "cir %d ", mp->cir);
2395  s = format (s, "eir %d ", mp->eir);
2396  s = format (s, "cb %d ", mp->cb);
2397  s = format (s, "eb %d ", mp->eb);
2398 
2399  switch (mp->rate_type)
2400  {
2401  case SSE2_QOS_RATE_KBPS:
2402  s = format (s, "rate_type kbps ");
2403  break;
2404  case SSE2_QOS_RATE_PPS:
2405  s = format (s, "rate_type pps ");
2406  break;
2407  default:
2408  break;
2409  }
2410 
2411  switch (mp->round_type)
2412  {
2414  s = format (s, "round_type closest ");
2415  break;
2416  case SSE2_QOS_ROUND_TO_UP:
2417  s = format (s, "round_type up ");
2418  break;
2420  s = format (s, "round_type down ");
2421  break;
2422  default:
2423  break;
2424  }
2425 
2426  switch (mp->type)
2427  {
2429  s = format (s, "type 1r2c ");
2430  break;
2432  s = format (s, "type 1r3c ");
2433  break;
2435  s = format (s, "type 2r3c-2698 ");
2436  break;
2438  s = format (s, "type 2r3c-4115 ");
2439  break;
2441  s = format (s, "type 2r3c-mef5cf1 ");
2442  break;
2443  default:
2444  break;
2445  }
2446 
2447  s = format (s, "conform_action %U ", format_policer_action,
2449  s = format (s, "exceed_action %U ", format_policer_action,
2450  mp->exceed_action_type, mp->exceed_dscp);
2451  s = format (s, "violate_action %U ", format_policer_action,
2453 
2454  if (mp->color_aware)
2455  s = format (s, "color-aware ");
2456  if (mp->is_add == 0)
2457  s = format (s, "del ");
2458 
2459  FINISH;
2460 }
2461 
2462 static void *vl_api_policer_dump_t_print
2463  (vl_api_policer_dump_t * mp, void *handle)
2464 {
2465  u8 *s;
2466 
2467  s = format (0, "SCRIPT: policer_dump ");
2468  if (mp->match_name_valid)
2469  s = format (s, "name %s ", mp->match_name);
2470 
2471  FINISH;
2472 }
2473 
2476 {
2477  u8 *s;
2478 
2479  s = format (0, "SCRIPT: policer_classify_set_interface ");
2480  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2481  if (mp->ip4_table_index != ~0)
2482  s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index));
2483  if (mp->ip6_table_index != ~0)
2484  s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index));
2485  if (mp->l2_table_index != ~0)
2486  s = format (s, "l2-table %d ", ntohl (mp->l2_table_index));
2487  if (mp->is_add == 0)
2488  s = format (s, "del ");
2489 
2490  FINISH;
2491 }
2492 
2494  (vl_api_policer_classify_dump_t * mp, void *handle)
2495 {
2496  u8 *s;
2497 
2498  s = format (0, "SCRIPT: policer_classify_dump ");
2499  switch (mp->type)
2500  {
2502  s = format (s, "type ip4 ");
2503  break;
2505  s = format (s, "type ip6 ");
2506  break;
2508  s = format (s, "type l2 ");
2509  break;
2510  default:
2511  break;
2512  }
2513 
2514  FINISH;
2515 }
2516 
2519 {
2520  u8 *s;
2521 
2522  s = format (0, "SCRIPT: sw_interface_clear_stats ");
2523  if (mp->sw_if_index != ~0)
2524  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2525 
2526  FINISH;
2527 }
2528 
2530  (vl_api_mpls_tunnel_dump_t * mp, void *handle)
2531 {
2532  u8 *s;
2533 
2534  s = format (0, "SCRIPT: mpls_tunnel_dump ");
2535  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2536 
2537  FINISH;
2538 }
2539 
2540 static void *vl_api_mpls_table_dump_t_print
2541  (vl_api_mpls_table_dump_t * mp, void *handle)
2542 {
2543  u8 *s;
2544 
2545  s = format (0, "SCRIPT: mpls_table_decap_dump ");
2546 
2547  FINISH;
2548 }
2549 
2550 static void *vl_api_mpls_route_dump_t_print
2551  (vl_api_mpls_route_dump_t * mp, void *handle)
2552 {
2553  u8 *s;
2554 
2555  s = format (0, "SCRIPT: mpls_route_decap_dump ");
2556 
2557  FINISH;
2558 }
2559 
2560 static void *vl_api_ip_table_dump_t_print
2561  (vl_api_ip_table_dump_t * mp, void *handle)
2562 {
2563  u8 *s;
2564 
2565  s = format (0, "SCRIPT: ip_table_dump ");
2566 
2567  FINISH;
2568 }
2569 
2570 static void *vl_api_ip_route_dump_t_print
2571  (vl_api_ip_route_dump_t * mp, void *handle)
2572 {
2573  u8 *s;
2574 
2575  s = format (0, "SCRIPT: ip_route_dump ");
2576 
2577  FINISH;
2578 }
2579 
2581  (vl_api_classify_table_ids_t * mp, void *handle)
2582 {
2583  u8 *s;
2584 
2585  s = format (0, "SCRIPT: classify_table_ids ");
2586 
2587  FINISH;
2588 }
2589 
2592 {
2593  u8 *s;
2594 
2595  s = format (0, "SCRIPT: classify_table_by_interface ");
2596  if (mp->sw_if_index != ~0)
2597  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2598 
2599  FINISH;
2600 }
2601 
2603  (vl_api_classify_table_info_t * mp, void *handle)
2604 {
2605  u8 *s;
2606 
2607  s = format (0, "SCRIPT: classify_table_info ");
2608  if (mp->table_id != ~0)
2609  s = format (s, "table_id %d ", ntohl (mp->table_id));
2610 
2611  FINISH;
2612 }
2613 
2615  (vl_api_classify_session_dump_t * mp, void *handle)
2616 {
2617  u8 *s;
2618 
2619  s = format (0, "SCRIPT: classify_session_dump ");
2620  if (mp->table_id != ~0)
2621  s = format (s, "table_id %d ", ntohl (mp->table_id));
2622 
2623  FINISH;
2624 }
2625 
2627  (vl_api_set_ipfix_exporter_t * mp, void *handle)
2628 {
2629  u8 *s;
2630 
2631  s = format (0, "SCRIPT: set_ipfix_exporter ");
2632 
2633  s = format (s, "collector-address %U ", format_ip4_address,
2635  s = format (s, "collector-port %d ", ntohs (mp->collector_port));
2636  s = format (s, "src-address %U ", format_ip4_address,
2637  (ip4_address_t *) mp->src_address);
2638  s = format (s, "vrf-id %d ", ntohl (mp->vrf_id));
2639  s = format (s, "path-mtu %d ", ntohl (mp->path_mtu));
2640  s = format (s, "template-interval %d ", ntohl (mp->template_interval));
2641  s = format (s, "udp-checksum %d ", mp->udp_checksum);
2642 
2643  FINISH;
2644 }
2645 
2647  (vl_api_ipfix_exporter_dump_t * mp, void *handle)
2648 {
2649  u8 *s;
2650 
2651  s = format (0, "SCRIPT: ipfix_exporter_dump ");
2652 
2653  FINISH;
2654 }
2655 
2658 {
2659  u8 *s;
2660 
2661  s = format (0, "SCRIPT: set_ipfix_classify_stream ");
2662 
2663  s = format (s, "domain-id %d ", ntohl (mp->domain_id));
2664  s = format (s, "src-port %d ", ntohs (mp->src_port));
2665 
2666  FINISH;
2667 }
2668 
2671 {
2672  u8 *s;
2673 
2674  s = format (0, "SCRIPT: ipfix_classify_stream_dump ");
2675 
2676  FINISH;
2677 }
2678 
2681 {
2682  u8 *s;
2683 
2684  s = format (0, "SCRIPT: ipfix_classify_table_add_del ");
2685 
2686  s = format (s, "table-id %d ", ntohl (mp->table_id));
2687  s = format (s, "ip-version %d ", mp->ip_version);
2688  s = format (s, "transport-protocol %d ", mp->transport_protocol);
2689 
2690  FINISH;
2691 }
2692 
2695 {
2696  u8 *s;
2697 
2698  s = format (0, "SCRIPT: ipfix_classify_table_dump ");
2699 
2700  FINISH;
2701 }
2702 
2705 {
2706  u8 *s;
2707 
2708  s = format (0, "SCRIPT: sw_interface_span_enable_disable ");
2709  s = format (s, "src_sw_if_index %u ", ntohl (mp->sw_if_index_from));
2710  s = format (s, "dst_sw_if_index %u ", ntohl (mp->sw_if_index_to));
2711 
2712  if (mp->is_l2)
2713  s = format (s, "l2 ");
2714 
2715  switch (mp->state)
2716  {
2717  case 0:
2718  s = format (s, "disable ");
2719  break;
2720  case 1:
2721  s = format (s, "rx ");
2722  break;
2723  case 2:
2724  s = format (s, "tx ");
2725  break;
2726  case 3:
2727  default:
2728  s = format (s, "both ");
2729  break;
2730  }
2731 
2732  FINISH;
2733 }
2734 
2735 static void *
2737  void *handle)
2738 {
2739  u8 *s;
2740 
2741  s = format (0, "SCRIPT: sw_interface_span_dump ");
2742 
2743  if (mp->is_l2)
2744  s = format (s, "l2 ");
2745 
2746  FINISH;
2747 }
2748 
2749 static void *vl_api_get_next_index_t_print
2750  (vl_api_get_next_index_t * mp, void *handle)
2751 {
2752  u8 *s;
2753 
2754  s = format (0, "SCRIPT: get_next_index ");
2755  s = format (s, "node-name %s ", mp->node_name);
2756  s = format (s, "next-node-name %s ", mp->next_name);
2757 
2758  FINISH;
2759 }
2760 
2762  (vl_api_pg_create_interface_t * mp, void *handle)
2763 {
2764  u8 *s;
2765 
2766  s = format (0, "SCRIPT: pg_create_interface ");
2767  s = format (0, "if_id %d", ntohl (mp->interface_id));
2768  s = format (0, "gso-enabled %u", mp->gso_enabled);
2769  s = format (0, "gso-size %u", ntohl (mp->gso_size));
2770 
2771  FINISH;
2772 }
2773 
2774 static void *vl_api_pg_capture_t_print
2775  (vl_api_pg_capture_t * mp, void *handle)
2776 {
2777  u8 *s;
2778 
2779  s = format (0, "SCRIPT: pg_capture ");
2780  s = format (0, "if_id %d ", ntohl (mp->interface_id));
2781  s = format (0, "pcap %s", mp->pcap_file_name);
2782  if (mp->count != ~0)
2783  s = format (s, "count %d ", ntohl (mp->count));
2784  if (!mp->is_enabled)
2785  s = format (s, "disable");
2786 
2787  FINISH;
2788 }
2789 
2791  (vl_api_pg_enable_disable_t * mp, void *handle)
2792 {
2793  u8 *s;
2794 
2795  s = format (0, "SCRIPT: pg_enable_disable ");
2796  if (ntohl (mp->stream_name_length) > 0)
2797  s = format (s, "stream %s", mp->stream_name);
2798  if (!mp->is_enabled)
2799  s = format (s, "disable");
2800 
2801  FINISH;
2802 }
2803 
2806 {
2807  u8 *s;
2808  int i;
2809 
2810  s = format (0, "SCRIPT: ip_source_and_port_range_check_add_del ");
2811  s = format (s, "%U ", format_vl_api_prefix, &mp->prefix);
2812 
2813  for (i = 0; i < mp->number_of_ranges; i++)
2814  {
2815  s = format (s, "range %d - %d ", mp->low_ports[i], mp->high_ports[i]);
2816  }
2817 
2818  s = format (s, "vrf %d ", ntohl (mp->vrf_id));
2819 
2820  if (mp->is_add == 0)
2821  s = format (s, "del ");
2822 
2823  FINISH;
2824 }
2825 
2828  void *handle)
2829 {
2830  u8 *s;
2831 
2832  s = format (0, "SCRIPT: ip_source_and_port_range_check_interface_add_del ");
2833 
2834  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2835 
2836  if (mp->tcp_out_vrf_id != ~0)
2837  s = format (s, "tcp-out-vrf %d ", ntohl (mp->tcp_out_vrf_id));
2838 
2839  if (mp->udp_out_vrf_id != ~0)
2840  s = format (s, "udp-out-vrf %d ", ntohl (mp->udp_out_vrf_id));
2841 
2842  if (mp->tcp_in_vrf_id != ~0)
2843  s = format (s, "tcp-in-vrf %d ", ntohl (mp->tcp_in_vrf_id));
2844 
2845  if (mp->udp_in_vrf_id != ~0)
2846  s = format (s, "udp-in-vrf %d ", ntohl (mp->udp_in_vrf_id));
2847 
2848  if (mp->is_add == 0)
2849  s = format (s, "del ");
2850 
2851  FINISH;
2852 }
2853 
2855  (vl_api_lisp_enable_disable_t * mp, void *handle)
2856 {
2857  u8 *s;
2858 
2859  s = format (0, "SCRIPT: lisp_enable_disable %s",
2860  mp->is_en ? "enable" : "disable");
2861 
2862  FINISH;
2863 }
2864 
2866  (vl_api_gpe_add_del_iface_t * mp, void *handle)
2867 {
2868  u8 *s;
2869 
2870  s = format (0, "SCRIPT: gpe_add_del_iface ");
2871 
2872  s = format (s, "%s ", mp->is_add ? "up" : "down");
2873  s = format (s, "vni %d ", mp->vni);
2874  s = format (s, "%s %d ", mp->is_l2 ? "bd_id" : "table_id", mp->dp_table);
2875 
2876  FINISH;
2877 }
2878 
2881 {
2882  u8 *s;
2883 
2884  s = format (0, "SCRIPT: lisp_pitr_set_locator_set ");
2885 
2886  if (mp->is_add)
2887  s = format (s, "locator-set %s ", mp->ls_name);
2888  else
2889  s = format (s, "del");
2890 
2891  FINISH;
2892 }
2893 
2894 static u8 *
2895 format_lisp_flat_eid (u8 * s, va_list * args)
2896 {
2897  u32 type = va_arg (*args, u32);
2898  u8 *eid = va_arg (*args, u8 *);
2899  u32 eid_len = va_arg (*args, u32);
2900 
2901  switch (type)
2902  {
2903  case 0:
2904  return format (s, "%U/%d", format_ip4_address, eid, eid_len);
2905  case 1:
2906  return format (s, "%U/%d", format_ip6_address, eid, eid_len);
2907  case 3:
2908  return format (s, "%U", format_ethernet_address, eid);
2909  }
2910  return 0;
2911 }
2912 
2915 {
2916  u8 *s;
2917  u32 rloc_num = 0;
2918 
2919  s = format (0, "SCRIPT: lisp_add_del_remote_mapping ");
2920 
2921  if (mp->del_all)
2922  s = format (s, "del-all ");
2923 
2924  s = format (s, "%s ", mp->is_add ? "add" : "del");
2925  s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni));
2926 
2927  s = format (s, "eid %U ", format_lisp_flat_eid,
2928  mp->eid_type, mp->eid, mp->eid_len);
2929 
2930  if (mp->is_src_dst)
2931  {
2932  s = format (s, "seid %U ", format_lisp_flat_eid,
2933  mp->eid_type, mp->seid, mp->seid_len);
2934  }
2935  rloc_num = clib_net_to_host_u32 (mp->rloc_num);
2936 
2937  if (0 == rloc_num)
2938  s = format (s, "action %d", mp->action);
2939 
2940  FINISH;
2941 }
2942 
2944  (vl_api_lisp_add_del_adjacency_t * mp, void *handle)
2945 {
2946  u8 *s;
2947 
2948  s = format (0, "SCRIPT: lisp_add_del_adjacency ");
2949 
2950  s = format (s, "%s ", mp->is_add ? "add" : "del");
2951  s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni));
2952  s = format (s, "reid %U leid %U ",
2953  format_lisp_flat_eid, mp->eid_type, mp->reid, mp->reid_len,
2954  format_lisp_flat_eid, mp->eid_type, mp->leid, mp->leid_len);
2955 
2956  FINISH;
2957 }
2958 
2961 {
2962  u8 *s;
2963 
2964  s = format (0, "SCRIPT: lisp_add_del_map_request_itr_rlocs ");
2965 
2966  if (mp->is_add)
2967  s = format (s, "%s", mp->locator_set_name);
2968  else
2969  s = format (s, "del");
2970 
2971  FINISH;
2972 }
2973 
2976 {
2977  u8 *s;
2978 
2979  s = format (0, "SCRIPT: lisp_eid_table_add_del_map ");
2980 
2981  if (!mp->is_add)
2982  s = format (s, "del ");
2983 
2984  s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni));
2985  s = format (s, "%s %d ",
2986  mp->is_l2 ? "bd_index" : "vrf",
2987  clib_net_to_host_u32 (mp->dp_table));
2988  FINISH;
2989 }
2990 
2992  (vl_api_lisp_add_del_local_eid_t * mp, void *handle)
2993 {
2994  u8 *s;
2995 
2996  s = format (0, "SCRIPT: lisp_add_del_local_eid ");
2997 
2998  if (!mp->is_add)
2999  s = format (s, "del ");
3000 
3001  s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni));
3002  s = format (s, "eid %U ", format_lisp_flat_eid, mp->eid_type, mp->eid,
3003  mp->prefix_len);
3004  s = format (s, "locator-set %s ", mp->locator_set_name);
3005  if (*mp->key)
3006  {
3007  u32 key_id = mp->key_id;
3008  s = format (s, "key-id %U", format_hmac_key_id, key_id);
3009  s = format (s, "secret-key %s", mp->key);
3010  }
3011  FINISH;
3012 }
3013 
3015  (vl_api_gpe_add_del_fwd_entry_t * mp, void *handle)
3016 {
3017  u8 *s;
3018 
3019  s = format (0, "SCRIPT: gpe_add_del_fwd_entry TODO");
3020 
3021  FINISH;
3022 }
3023 
3026 {
3027  u8 *s;
3028 
3029  s = format (0, "SCRIPT: lisp_add_del_map_resolver ");
3030 
3031  if (!mp->is_add)
3032  s = format (s, "del ");
3033 
3034  if (mp->is_ipv6)
3035  s = format (s, "%U ", format_ip6_address, mp->ip_address);
3036  else
3037  s = format (s, "%U ", format_ip4_address, mp->ip_address);
3038 
3039  FINISH;
3040 }
3041 
3043  (vl_api_gpe_enable_disable_t * mp, void *handle)
3044 {
3045  u8 *s;
3046 
3047  s = format (0, "SCRIPT: gpe_enable_disable ");
3048 
3049  s = format (s, "%s ", mp->is_en ? "enable" : "disable");
3050 
3051  FINISH;
3052 }
3053 
3056 {
3057  u8 *s;
3058 
3059  s = format (0, "SCRIPT: lisp_add_del_locator_set ");
3060 
3061  if (!mp->is_add)
3062  s = format (s, "del ");
3063 
3064  s = format (s, "locator-set %s ", mp->locator_set_name);
3065 
3066  FINISH;
3067 }
3068 
3070  (vl_api_lisp_add_del_locator_t * mp, void *handle)
3071 {
3072  u8 *s;
3073 
3074  s = format (0, "SCRIPT: lisp_add_del_locator ");
3075 
3076  if (!mp->is_add)
3077  s = format (s, "del ");
3078 
3079  s = format (s, "locator-set %s ", mp->locator_set_name);
3080  s = format (s, "sw_if_index %d ", mp->sw_if_index);
3081  s = format (s, "p %d w %d ", mp->priority, mp->weight);
3082 
3083  FINISH;
3084 }
3085 
3087  (vl_api_lisp_locator_set_dump_t * mp, void *handle)
3088 {
3089  u8 *s;
3090 
3091  s = format (0, "SCRIPT: lisp_locator_set_dump ");
3092  if (mp->filter == 1)
3093  s = format (s, "local");
3094  else if (mp->filter == 2)
3095  s = format (s, "remote");
3096 
3097  FINISH;
3098 }
3099 
3101  (vl_api_lisp_locator_dump_t * mp, void *handle)
3102 {
3103  u8 *s;
3104 
3105  s = format (0, "SCRIPT: lisp_locator_dump ");
3106  if (mp->is_index_set)
3107  s = format (s, "ls_index %d", clib_net_to_host_u32 (mp->ls_index));
3108  else
3109  s = format (s, "ls_name %s", mp->ls_name);
3110 
3111  FINISH;
3112 }
3113 
3115  (vl_api_lisp_map_request_mode_t * mp, void *handle)
3116 {
3117  u8 *s;
3118 
3119  s = format (0, "SCRIPT: lisp_map_request_mode ");
3120 
3121  switch (mp->mode)
3122  {
3123  case 0:
3124  s = format (s, "dst-only");
3125  break;
3126  case 1:
3127  s = format (s, "src-dst");
3128  default:
3129  break;
3130  }
3131 
3132  FINISH;
3133 }
3134 
3136  (vl_api_lisp_eid_table_dump_t * mp, void *handle)
3137 {
3138  u8 *s;
3139 
3140  s = format (0, "SCRIPT: lisp_eid_table_dump ");
3141 
3142  if (mp->eid_set)
3143  {
3144  s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni));
3145  s = format (s, "eid %U ", format_lisp_flat_eid, mp->eid_type,
3146  mp->eid, mp->prefix_length);
3147  switch (mp->filter)
3148  {
3149  case 1:
3150  s = format (s, "local ");
3151  break;
3152  case 2:
3153  s = format (s, "remote ");
3154  break;
3155  }
3156  }
3157  FINISH;
3158 }
3159 
3162 {
3163  u8 *s;
3164 
3165  s = format (0, "SCRIPT: lisp_rloc_probe_enable_disable ");
3166  if (mp->is_enabled)
3167  s = format (s, "enable");
3168  else
3169  s = format (s, "disable");
3170 
3171  FINISH;
3172 }
3173 
3176 {
3177  u8 *s;
3178 
3179  s = format (0, "SCRIPT: lisp_map_register_enable_disable ");
3180  if (mp->is_enabled)
3181  s = format (s, "enable");
3182  else
3183  s = format (s, "disable");
3184 
3185  FINISH;
3186 }
3187 
3189  (vl_api_lisp_adjacencies_get_t * mp, void *handle)
3190 {
3191  u8 *s;
3192 
3193  s = format (0, "SCRIPT: lisp_adjacencies_get ");
3194  s = format (s, "vni %d", clib_net_to_host_u32 (mp->vni));
3195 
3196  FINISH;
3197 }
3198 
3201 {
3202  u8 *s;
3203 
3204  s = format (0, "SCRIPT: lisp_eid_table_map_dump ");
3205 
3206  if (mp->is_l2)
3207  s = format (s, "l2");
3208  else
3209  s = format (s, "l3");
3210 
3211  FINISH;
3212 }
3213 
3216 {
3217  u8 *s;
3218 
3219  s = format (0, "SCRIPT: ipsec_tunnel_if_add_del ");
3220 
3221  if (mp->esn)
3222  s = format (s, "esn");
3223  if (mp->anti_replay)
3224  s = format (s, "anti-replay");
3225  if (mp->udp_encap)
3226  s = format (s, "udp-encap");
3227 
3228  s = format (s, "local-ip %U ", format_vl_api_address, &mp->remote_ip);
3229 
3230  s = format (s, "remote-ip %U ", format_vl_api_address, &mp->local_ip);
3231  s = format (s, "tx-table-id %d ", ntohl (mp->tx_table_id));
3232 
3233  s = format (s, "local-spi %d ", ntohl (mp->local_spi));
3234 
3235  s = format (s, "remote-spi %d ", ntohl (mp->remote_spi));
3236 
3237  s = format (s, "local-crypto-key-len %d ", mp->local_crypto_key_len);
3238  s = format (s, "local-crypto-key %U ", format_hex_bytes,
3240  s = format (s, "remote-crypto-key-len %d ", mp->remote_crypto_key_len);
3241  s = format (s, "remote-crypto-key %U ", format_hex_bytes,
3243  s = format (s, "local-integ-key-len %d ", mp->local_integ_key_len);
3244  s = format (s, "local-integ-key %U ", format_hex_bytes,
3245  mp->local_integ_key, mp->local_integ_key_len, 0);
3246  s = format (s, "remote-integ-key-len %d ", mp->remote_integ_key_len);
3247  s = format (s, "remote-integ-key %U ", format_hex_bytes,
3249 
3250  if (mp->is_add == 0)
3251  s = format (s, "del ");
3252 
3253  FINISH;
3254 }
3255 
3256 static const char *policy_strs[] = {
3257  "BYPASS",
3258  "DISCARD",
3259  "RESOLVE",
3260  "PROTECT",
3261 };
3262 
3263 static const char *proto_strs[] = {
3264  "ESP",
3265  "AH",
3266 };
3267 
3268 static const char *algo_strs[] = {
3269  "NONE",
3270  "AES_CBC_128",
3271  "AES_CBC_192",
3272  "AES_CBC_256",
3273  "AES_CTR_128",
3274  "AES_CTR_192",
3275  "AES_CTR_256",
3276  "AES_GCM_128",
3277  "AES_GCM_192",
3278  "AES_GCM_256",
3279  "DES_CBC",
3280  "3DES_CBC",
3281 };
3282 
3283 
3284 static const char *integ_strs[] = {
3285  "NONE",
3286  "MD5_96",
3287  "SHA1_96",
3288  "SHA_256_96",
3289  "SHA_256_128",
3290  "SHA_384_192",
3291  "SHA_512_256",
3292 };
3293 
3296 {
3297  u8 *s;
3298  const char *str;
3299  vl_api_ipsec_spd_entry_t *ep;
3300  int policy_host_byte_order;
3301 
3302  ep = (vl_api_ipsec_spd_entry_t *) & mp->entry;
3303 
3304  s = format (0, "SCRIPT: ipsec_spd_entry ");
3305  s = format (s, "is_add %d spd_id %u priority %d is_outbound %d sa_id %u\n",
3306  mp->is_add,
3307  ntohl (ep->spd_id), ntohl (ep->priority), ep->is_outbound,
3308  ntohl (ep->sa_id));
3309 
3310  policy_host_byte_order = ntohl (ep->policy);
3311 
3312  if (policy_host_byte_order < ARRAY_LEN (policy_strs))
3313  str = policy_strs[policy_host_byte_order];
3314  else
3315  str = "BOGUS!";
3316 
3317  s = format (s, " policy: %s protocol %d\n", str, ep->protocol);
3318 
3319  s = format (s, " remote_address_start %U remote_address_stop %U\n",
3321  &ep->remote_address_start,
3322  format_vl_api_address, &ep->remote_address_stop);
3323 
3324  s = format (s, " local_address_start %U local_address_stop %U\n",
3326  &ep->local_address_start,
3327  format_vl_api_address, &ep->local_address_stop);
3328 
3329  s = format (s, " remote_port_start %d remote_port_stop %d\n",
3330  ntohs (ep->remote_port_start), ntohs (ep->remote_port_stop));
3331 
3332  s = format (s, " local_port_start %d local_port_stop %d ",
3333  ntohs (ep->local_port_start), ntohs (ep->local_port_stop));
3334 
3335  FINISH;
3336 }
3337 
3340 {
3341  u8 *s;
3342 
3343  s = format (0, "SCRIPT: ipsec_interface_add_del_spd ");
3344  s = format (s, "is_add %d sw_if_index %d spd_id %u ",
3345  mp->is_add, ntohl (mp->sw_if_index), ntohl (mp->spd_id));
3346  FINISH;
3347 }
3348 
3350  (vl_api_ipsec_spd_add_del_t * mp, void *handle)
3351 {
3352  u8 *s;
3353 
3354  s = format (0, "SCRIPT: ipsec_spd_add_del ");
3355  s = format (s, "spd_id %u is_add %d ", ntohl (mp->spd_id), mp->is_add);
3356  FINISH;
3357 }
3358 
3361 {
3362  u8 *s;
3363  int tmp;
3364  vl_api_ipsec_sad_entry_t *ep;
3365  const char *protocol_str, *algo_str, *integ_str;
3366 
3367  protocol_str = "BOGUS protocol!";
3368  algo_str = "BOGUS crypto_algorithm!";
3369  integ_str = "BOGUS integrity_algorithm!";
3370 
3371  ep = (vl_api_ipsec_sad_entry_t *) & mp->entry;
3372 
3373  s = format (0, "SCRIPT: ipsec_sad_entry_add_del is_add ", mp->is_add);
3374 
3375  tmp = ntohl (ep->protocol);
3376  if (tmp < ARRAY_LEN (proto_strs))
3377  protocol_str = proto_strs[tmp];
3378 
3379  tmp = ntohl (ep->crypto_algorithm);
3380  if (tmp < ARRAY_LEN (algo_strs))
3381  algo_str = algo_strs[tmp];
3382 
3383  tmp = ntohl (ep->integrity_algorithm);
3384  if (tmp < ARRAY_LEN (integ_strs))
3385  integ_str = integ_strs[tmp];
3386 
3387  s = format (s, "proto %s crypto alg %s integ alg %s\n",
3388  protocol_str, algo_str, integ_str);
3389  s = format (s, " crypto_key len %d value %U\n",
3390  ep->crypto_key.length, format_hex_bytes, ep->crypto_key.data,
3391  (int) (ep->crypto_key.length));
3392  s = format (s, " integ_key len %d value %U\n",
3393  ep->integrity_key.length, format_hex_bytes,
3394  ep->integrity_key.data, (int) (ep->integrity_key.length));
3395  s = format (s, " flags 0x%x ", ntohl (ep->flags));
3396 
3397  s = format (s, "tunnel_src %U tunnel_dst %U\n",
3399  &ep->tunnel_src, format_vl_api_address, &ep->tunnel_dst);
3400  s = format (s, " tx_table_id %u salt %u ",
3401  ntohl (ep->tx_table_id), ntohl (ep->salt));
3402  FINISH;
3403 }
3404 
3405 
3408 {
3409  u8 *s;
3410  u32 vtr_op = ntohl (mp->vtr_op);
3411 
3412  s = format (0, "SCRIPT: l2_interface_pbb_tag_rewrite ");
3413 
3414  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
3415  s = format (s, "vtr_op %d ", vtr_op);
3416  if (vtr_op != L2_VTR_DISABLED && vtr_op != L2_VTR_POP_2)
3417  {
3418  if (vtr_op == L2_VTR_TRANSLATE_2_2)
3419  s = format (s, "%d ", ntohs (mp->outer_tag));
3420  s = format (s, "dmac %U ", format_ethernet_address, &mp->b_dmac);
3421  s = format (s, "smac %U ", format_ethernet_address, &mp->b_smac);
3422  s = format (s, "sid %d ", ntohl (mp->i_sid));
3423  s = format (s, "vlanid %d ", ntohs (mp->b_vlanid));
3424  }
3425  FINISH;
3426 }
3427 
3430 {
3431  u8 *s;
3432 
3433  s = format (0, "SCRIPT: flow_classify_set_interface ");
3434  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
3435  if (mp->ip4_table_index != ~0)
3436  s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index));
3437  if (mp->ip6_table_index != ~0)
3438  s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index));
3439  if (mp->is_add == 0)
3440  s = format (s, "del ");
3441 
3442  FINISH;
3443 }
3444 
3445 static void *
3447 {
3448  u8 *s;
3449 
3450  s = format (0, "SCRIPT: punt ");
3451 
3452  switch (clib_net_to_host_u32 (mp->punt.type))
3453  {
3454  case PUNT_API_TYPE_L4:
3455  s = format (s, "%U", format_vl_api_address_family, mp->punt.punt.l4.af);
3456 
3457  s = format (s, "protocol %d ", mp->punt.punt.l4.protocol);
3458 
3459  if (mp->punt.punt.l4.port != (u16) ~ 0)
3460  s = format (s, "port %d ", ntohs (mp->punt.punt.l4.port));
3461  break;
3462  }
3463 
3464  if (!mp->is_add)
3465  s = format (s, "del ");
3466 
3467  FINISH;
3468 }
3469 
3471  (vl_api_flow_classify_dump_t * mp, void *handle)
3472 {
3473  u8 *s;
3474 
3475  s = format (0, "SCRIPT: flow_classify_dump ");
3476  switch (mp->type)
3477  {
3479  s = format (s, "type ip4 ");
3480  break;
3482  s = format (s, "type ip6 ");
3483  break;
3484  default:
3485  break;
3486  }
3487 
3488  FINISH;
3489 }
3490 
3492  (vl_api_get_first_msg_id_t * mp, void *handle)
3493 {
3494  u8 *s;
3495 
3496  s = format (0, "SCRIPT: get_first_msg_id %s ", mp->name);
3497 
3498  FINISH;
3499 }
3500 
3501 static void *vl_api_ioam_enable_t_print
3502  (vl_api_ioam_enable_t * mp, void *handle)
3503 {
3504  u8 *s;
3505 
3506  s = format (0, "SCRIPT: ioam_enable ");
3507 
3508  if (mp->trace_enable)
3509  s = format (s, "trace enabled");
3510 
3511  if (mp->pot_enable)
3512  s = format (s, "POT enabled");
3513 
3514  if (mp->seqno)
3515  s = format (s, "Seqno enabled");
3516 
3517  if (mp->analyse)
3518  s = format (s, "Analyse enabled");
3519 
3520  FINISH;
3521 }
3522 
3523 static void *vl_api_ioam_disable_t_print
3524  (vl_api_ioam_disable_t * mp, void *handle)
3525 {
3526  u8 *s;
3527 
3528  s = format (0, "SCRIPT: ioam_disable ");
3529  s = format (s, "trace disabled");
3530  s = format (s, "POT disabled");
3531  s = format (s, "Seqno disabled");
3532  s = format (s, "Analyse disabled");
3533 
3534  FINISH;
3535 }
3536 
3538  (vl_api_feature_enable_disable_t * mp, void *handle)
3539 {
3540  u8 *s;
3541 
3542  s = format (0, "SCRIPT: feature_enable_disable ");
3543  s = format (s, "arc_name %s ", mp->arc_name);
3544  s = format (s, "feature_name %s ", mp->feature_name);
3545  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
3546  if (!mp->enable)
3547  s = format (s, "disable");
3548 
3549  FINISH;
3550 }
3551 
3554 {
3555  u8 *s;
3556 
3557  s = format (0, "SCRIPT: sw_interface_tag_add_del ");
3558  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
3559  if (mp->is_add)
3560  s = format (s, "tag %s ", mp->tag);
3561  else
3562  s = format (s, "del ");
3563 
3564  FINISH;
3565 }
3566 
3568  (vl_api_hw_interface_set_mtu_t * mp, void *handle)
3569 {
3570  u8 *s;
3571 
3572  s = format (0, "SCRIPT: sw_interface_set_mtu ");
3573  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
3574  s = format (s, "tag %d ", ntohs (mp->mtu));
3575 
3576  FINISH;
3577 }
3578 
3580  (vl_api_p2p_ethernet_add_t * mp, void *handle)
3581 {
3582  u8 *s;
3583 
3584  s = format (0, "SCRIPT: p2p_ethernet_add ");
3585  s = format (s, "sw_if_index %d ", ntohl (mp->parent_if_index));
3586  s = format (s, "remote_mac %U ", format_ethernet_address, mp->remote_mac);
3587 
3588  FINISH;
3589 }
3590 
3592  (vl_api_p2p_ethernet_del_t * mp, void *handle)
3593 {
3594  u8 *s;
3595 
3596  s = format (0, "SCRIPT: p2p_ethernet_del ");
3597  s = format (s, "sw_if_index %d ", ntohl (mp->parent_if_index));
3598  s = format (s, "remote_mac %U ", format_ethernet_address, mp->remote_mac);
3599 
3600  FINISH;
3601 }
3602 
3605 {
3606  u8 *s;
3607 
3608  s = format (0, "SCRIPT: tcp_configure_src_addresses ");
3609  if (mp->is_ipv6)
3610  s = format (s, "%U - %U ",
3613  else
3614  s = format (s, "%U - %U ",
3617 
3618  if (mp->vrf_id)
3619  s = format (s, "vrf %d ", ntohl (mp->vrf_id));
3620 
3621  FINISH;
3622 }
3623 
3625  (vl_api_app_namespace_add_del_t * mp, void *handle)
3626 {
3627  u8 *s;
3629  ARRAY_LEN (mp->namespace_id) - 1);
3630  mp->namespace_id[len] = 0;
3631  s = format (0, "SCRIPT: app_namespace_add_del ");
3632  s = format (s, "ns-id %s secret %lu sw_if_index %d ipv4_fib_id %d "
3633  "ipv6_fib_id %d", (char *) mp->namespace_id, mp->secret,
3634  clib_net_to_host_u32 (mp->sw_if_index),
3635  clib_net_to_host_u32 (mp->ip4_fib_id),
3636  clib_net_to_host_u32 (mp->ip6_fib_id));
3637  FINISH;
3638 }
3639 
3641  (vl_api_sw_interface_set_lldp_t * mp, void *handle)
3642 {
3643  u8 *s;
3644  u8 null_data[256];
3645 
3646  clib_memset (null_data, 0, sizeof (null_data));
3647 
3648  s = format (0, "SCRIPT: sw_interface_set_lldp ");
3649  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
3650 
3651  if (memcmp (mp->port_desc, null_data, sizeof (mp->port_desc)))
3652  s = format (s, "port_desc %s ", mp->port_desc);
3653 
3654  if (memcmp (mp->mgmt_ip4, null_data, sizeof (mp->mgmt_ip4)))
3655  s = format (s, "mgmt_ip4 %U ", format_ip4_address, mp->mgmt_ip4);
3656 
3657  if (memcmp (mp->mgmt_ip6, null_data, sizeof (mp->mgmt_ip6)))
3658  s = format (s, "mgmt_ip6 %U ", format_ip6_address, mp->mgmt_ip6);
3659 
3660  if (memcmp (mp->mgmt_oid, null_data, sizeof (mp->mgmt_oid)))
3661  s = format (s, "mgmt_oid %s ", mp->mgmt_oid);
3662 
3663  if (mp->enable == 0)
3664  s = format (s, "disable ");
3665 
3666  FINISH;
3667 }
3668 
3669 static void *vl_api_lldp_config_t_print
3670  (vl_api_lldp_config_t * mp, void *handle)
3671 {
3672  u8 *s;
3673 
3674  s = format (0, "SCRIPT: lldp_config ");
3675  s = format (s, "system_name %s ", mp->system_name);
3676  s = format (s, "tx_hold %d ", ntohl (mp->tx_hold));
3677  s = format (s, "tx_interval %d ", ntohl (mp->tx_interval));
3678  FINISH;
3679 }
3680 
3682  (vl_api_session_rule_add_del_t * mp, void *handle)
3683 {
3684  u8 *s;
3685  char *proto = mp->transport_proto == 0 ? "tcp" : "udp";
3686  s = format (0, "SCRIPT: session_rule_add_del ");
3687  mp->tag[sizeof (mp->tag) - 1] = 0;
3688  if (mp->is_ip4)
3689  s = format (s, "appns %d scope %d %s %U/%d %d %U/%d %d action %u tag %s",
3690  mp->appns_index, mp->scope, proto, format_ip4_address,
3691  (ip4_address_t *) mp->lcl_ip, mp->lcl_plen,
3693  mp->rmt_plen, mp->action_index, mp->tag);
3694  else
3695  s = format (s, "appns %d scope %d %s %U/%d %d %U/%d %d action %u tag %s",
3696  mp->appns_index, mp->scope, proto, format_ip6_address,
3697  (ip6_address_t *) mp->lcl_ip, mp->lcl_plen,
3699  mp->rmt_plen, mp->action_index, mp->tag);
3700  FINISH;
3701 }
3702 
3703 __clib_unused
3706 {
3707  u8 *s;
3708  s = format (0, "SCRIPT: ip_container_proxy_add_del ");
3709  s = format (s, "is_add %d prefix %U sw_if_index %d",
3711 
3712  FINISH;
3713 }
3714 
3717 {
3718  u8 *s;
3719 
3720  s = format (0, "SCRIPT: qos_record_enable_disable ");
3721  s = format (s, "sw_if_index %d ", ntohl (mp->record.sw_if_index));
3722  s = format (s, "input_source %U ", format_qos_source,
3723  mp->record.input_source);
3724 
3725  if (!mp->enable)
3726  s = format (s, "disable ");
3727 
3728  FINISH;
3729 }
3730 
3731 #define foreach_no_print_function \
3732 _(memclnt_keepalive_reply)
3733 
3734 #define _(f) \
3735 static void * vl_api_ ## f ## _t_print \
3736  (vl_api_ ## f ## _t * mp, void * handle) \
3737 { \
3738  return handle; \
3739 }
3741 #undef _
3742 
3743 #define foreach_custom_print_no_arg_function \
3744 _(lisp_eid_table_vni_dump) \
3745 _(lisp_map_resolver_dump) \
3746 _(lisp_map_server_dump) \
3747 _(show_lisp_rloc_probe_state) \
3748 _(show_lisp_map_register_state) \
3749 _(show_lisp_map_request_mode)
3750 
3751 #define _(f) \
3752 static void * vl_api_ ## f ## _t_print \
3753  (vl_api_ ## f ## _t * mp, void * handle) \
3754 { \
3755  u8 * s; \
3756  s = format (0, "SCRIPT: " #f ); \
3757  FINISH; \
3758 }
3760 #undef _
3761 #define foreach_custom_print_function \
3762 _(CREATE_LOOPBACK, create_loopback) \
3763 _(CREATE_LOOPBACK_INSTANCE, create_loopback_instance) \
3764 _(SW_INTERFACE_SET_FLAGS, sw_interface_set_flags) \
3765 _(SW_INTERFACE_EVENT, sw_interface_event) \
3766 _(SW_INTERFACE_ADD_DEL_ADDRESS, sw_interface_add_del_address) \
3767 _(SW_INTERFACE_SET_TABLE, sw_interface_set_table) \
3768 _(SW_INTERFACE_SET_MPLS_ENABLE, sw_interface_set_mpls_enable) \
3769 _(SW_INTERFACE_SET_VPATH, sw_interface_set_vpath) \
3770 _(SW_INTERFACE_SET_VXLAN_BYPASS, sw_interface_set_vxlan_bypass) \
3771 _(SW_INTERFACE_SET_GENEVE_BYPASS, sw_interface_set_geneve_bypass) \
3772 _(BOND_CREATE, bond_create) \
3773 _(BOND_DELETE, bond_delete) \
3774 _(BOND_ENSLAVE, bond_enslave) \
3775 _(BOND_DETACH_SLAVE, bond_detach_slave) \
3776 _(SW_INTERFACE_SLAVE_DUMP, sw_interface_slave_dump) \
3777 _(SW_INTERFACE_BOND_DUMP, sw_interface_bond_dump) \
3778 _(SW_INTERFACE_RX_PLACEMENT_DUMP, sw_interface_rx_placement_dump) \
3779 _(TAP_CREATE_V2, tap_create_v2) \
3780 _(TAP_DELETE_V2, tap_delete_v2) \
3781 _(SW_INTERFACE_TAP_V2_DUMP, sw_interface_tap_v2_dump) \
3782 _(IP_TABLE_ADD_DEL, ip_table_add_del) \
3783 _(MPLS_ROUTE_ADD_DEL, mpls_route_add_del) \
3784 _(MPLS_TABLE_ADD_DEL, mpls_table_add_del) \
3785 _(IP_ROUTE_ADD_DEL, ip_route_add_del) \
3786 _(PROXY_ARP_ADD_DEL, proxy_arp_add_del) \
3787 _(PROXY_ARP_INTFC_ENABLE_DISABLE, proxy_arp_intfc_enable_disable) \
3788 _(MPLS_TUNNEL_ADD_DEL, mpls_tunnel_add_del) \
3789 _(SR_MPLS_POLICY_ADD, sr_mpls_policy_add) \
3790 _(SR_MPLS_POLICY_DEL, sr_mpls_policy_del) \
3791 _(SW_INTERFACE_SET_UNNUMBERED, sw_interface_set_unnumbered) \
3792 _(IP_NEIGHBOR_ADD_DEL, ip_neighbor_add_del) \
3793 _(CREATE_VLAN_SUBIF, create_vlan_subif) \
3794 _(CREATE_SUBIF, create_subif) \
3795 _(RESET_FIB, reset_fib) \
3796 _(DHCP_PROXY_CONFIG, dhcp_proxy_config) \
3797 _(DHCP_PROXY_SET_VSS, dhcp_proxy_set_vss) \
3798 _(SET_IP_FLOW_HASH, set_ip_flow_hash) \
3799 _(SW_INTERFACE_IP6ND_RA_PREFIX, sw_interface_ip6nd_ra_prefix) \
3800 _(SW_INTERFACE_IP6ND_RA_CONFIG, sw_interface_ip6nd_ra_config) \
3801 _(SET_ARP_NEIGHBOR_LIMIT, set_arp_neighbor_limit) \
3802 _(L2_PATCH_ADD_DEL, l2_patch_add_del) \
3803 _(SR_LOCALSID_ADD_DEL, sr_localsid_add_del) \
3804 _(SR_STEERING_ADD_DEL, sr_steering_add_del) \
3805 _(SR_POLICY_ADD, sr_policy_add) \
3806 _(SR_POLICY_MOD, sr_policy_mod) \
3807 _(SR_POLICY_DEL, sr_policy_del) \
3808 _(SW_INTERFACE_SET_L2_XCONNECT, sw_interface_set_l2_xconnect) \
3809 _(L2FIB_ADD_DEL, l2fib_add_del) \
3810 _(L2FIB_FLUSH_ALL, l2fib_flush_all) \
3811 _(L2FIB_FLUSH_BD, l2fib_flush_bd) \
3812 _(L2FIB_FLUSH_INT, l2fib_flush_int) \
3813 _(L2_FLAGS, l2_flags) \
3814 _(BRIDGE_FLAGS, bridge_flags) \
3815 _(CLASSIFY_ADD_DEL_TABLE, classify_add_del_table) \
3816 _(CLASSIFY_ADD_DEL_SESSION, classify_add_del_session) \
3817 _(SW_INTERFACE_SET_L2_BRIDGE, sw_interface_set_l2_bridge) \
3818 _(BRIDGE_DOMAIN_ADD_DEL, bridge_domain_add_del) \
3819 _(BRIDGE_DOMAIN_DUMP, bridge_domain_dump) \
3820 _(BRIDGE_DOMAIN_SET_MAC_AGE, bridge_domain_set_mac_age) \
3821 _(CLASSIFY_SET_INTERFACE_IP_TABLE, classify_set_interface_ip_table) \
3822 _(CLASSIFY_SET_INTERFACE_L2_TABLES, classify_set_interface_l2_tables) \
3823 _(ADD_NODE_NEXT, add_node_next) \
3824 _(DHCP_CLIENT_CONFIG, dhcp_client_config) \
3825 _(L2TPV3_CREATE_TUNNEL, l2tpv3_create_tunnel) \
3826 _(L2TPV3_SET_TUNNEL_COOKIES, l2tpv3_set_tunnel_cookies) \
3827 _(L2TPV3_INTERFACE_ENABLE_DISABLE, l2tpv3_interface_enable_disable) \
3828 _(L2TPV3_SET_LOOKUP_KEY, l2tpv3_set_lookup_key) \
3829 _(SW_IF_L2TPV3_TUNNEL_DUMP, sw_if_l2tpv3_tunnel_dump) \
3830 _(VXLAN_ADD_DEL_TUNNEL, vxlan_add_del_tunnel) \
3831 _(VXLAN_TUNNEL_DUMP, vxlan_tunnel_dump) \
3832 _(VXLAN_OFFLOAD_RX, vxlan_offload_rx) \
3833 _(GENEVE_ADD_DEL_TUNNEL, geneve_add_del_tunnel) \
3834 _(GENEVE_TUNNEL_DUMP, geneve_tunnel_dump) \
3835 _(GRE_TUNNEL_ADD_DEL, gre_tunnel_add_del) \
3836 _(GRE_TUNNEL_DUMP, gre_tunnel_dump) \
3837 _(L2_FIB_CLEAR_TABLE, l2_fib_clear_table) \
3838 _(L2_INTERFACE_EFP_FILTER, l2_interface_efp_filter) \
3839 _(L2_INTERFACE_VLAN_TAG_REWRITE, l2_interface_vlan_tag_rewrite) \
3840 _(CREATE_VHOST_USER_IF, create_vhost_user_if) \
3841 _(MODIFY_VHOST_USER_IF, modify_vhost_user_if) \
3842 _(DELETE_VHOST_USER_IF, delete_vhost_user_if) \
3843 _(SW_INTERFACE_DUMP, sw_interface_dump) \
3844 _(CONTROL_PING, control_ping) \
3845 _(WANT_INTERFACE_EVENTS, want_interface_events) \
3846 _(CLI, cli) \
3847 _(CLI_INBAND, cli_inband) \
3848 _(MEMCLNT_CREATE, memclnt_create) \
3849 _(SOCKCLNT_CREATE, sockclnt_create) \
3850 _(SW_INTERFACE_VHOST_USER_DUMP, sw_interface_vhost_user_dump) \
3851 _(SHOW_VERSION, show_version) \
3852 _(L2_FIB_TABLE_DUMP, l2_fib_table_dump) \
3853 _(VXLAN_GPE_ADD_DEL_TUNNEL, vxlan_gpe_add_del_tunnel) \
3854 _(VXLAN_GPE_TUNNEL_DUMP, vxlan_gpe_tunnel_dump) \
3855 _(VXLAN_GBP_TUNNEL_ADD_DEL, vxlan_gbp_tunnel_add_del) \
3856 _(VXLAN_GBP_TUNNEL_DUMP, vxlan_gbp_tunnel_dump) \
3857 _(SW_INTERFACE_SET_VXLAN_GBP_BYPASS, sw_interface_set_vxlan_gbp_bypass) \
3858 _(INTERFACE_NAME_RENUMBER, interface_name_renumber) \
3859 _(IP_PROBE_NEIGHBOR, ip_probe_neighbor) \
3860 _(IP_SCAN_NEIGHBOR_ENABLE_DISABLE, ip_scan_neighbor_enable_disable) \
3861 _(WANT_IP4_ARP_EVENTS, want_ip4_arp_events) \
3862 _(WANT_IP6_ND_EVENTS, want_ip6_nd_events) \
3863 _(WANT_L2_MACS_EVENTS, want_l2_macs_events) \
3864 _(INPUT_ACL_SET_INTERFACE, input_acl_set_interface) \
3865 _(IP_ADDRESS_DUMP, ip_address_dump) \
3866 _(IP_DUMP, ip_dump) \
3867 _(DELETE_LOOPBACK, delete_loopback) \
3868 _(BD_IP_MAC_ADD_DEL, bd_ip_mac_add_del) \
3869 _(BD_IP_MAC_FLUSH, bd_ip_mac_flush) \
3870 _(COP_INTERFACE_ENABLE_DISABLE, cop_interface_enable_disable) \
3871 _(COP_WHITELIST_ENABLE_DISABLE, cop_whitelist_enable_disable) \
3872 _(AF_PACKET_CREATE, af_packet_create) \
3873 _(AF_PACKET_DELETE, af_packet_delete) \
3874 _(AF_PACKET_DUMP, af_packet_dump) \
3875 _(SW_INTERFACE_CLEAR_STATS, sw_interface_clear_stats) \
3876 _(MPLS_TABLE_DUMP, mpls_table_dump) \
3877 _(MPLS_ROUTE_DUMP, mpls_route_dump) \
3878 _(MPLS_TUNNEL_DUMP, mpls_tunnel_dump) \
3879 _(CLASSIFY_TABLE_IDS,classify_table_ids) \
3880 _(CLASSIFY_TABLE_BY_INTERFACE, classify_table_by_interface) \
3881 _(CLASSIFY_TABLE_INFO,classify_table_info) \
3882 _(CLASSIFY_SESSION_DUMP,classify_session_dump) \
3883 _(SET_IPFIX_EXPORTER, set_ipfix_exporter) \
3884 _(IPFIX_EXPORTER_DUMP, ipfix_exporter_dump) \
3885 _(SET_IPFIX_CLASSIFY_STREAM, set_ipfix_classify_stream) \
3886 _(IPFIX_CLASSIFY_STREAM_DUMP, ipfix_classify_stream_dump) \
3887 _(IPFIX_CLASSIFY_TABLE_ADD_DEL, ipfix_classify_table_add_del) \
3888 _(IPFIX_CLASSIFY_TABLE_DUMP, ipfix_classify_table_dump) \
3889 _(SW_INTERFACE_SPAN_ENABLE_DISABLE, sw_interface_span_enable_disable) \
3890 _(SW_INTERFACE_SPAN_DUMP, sw_interface_span_dump) \
3891 _(GET_NEXT_INDEX, get_next_index) \
3892 _(PG_CREATE_INTERFACE,pg_create_interface) \
3893 _(PG_CAPTURE, pg_capture) \
3894 _(PG_ENABLE_DISABLE, pg_enable_disable) \
3895 _(POLICER_ADD_DEL, policer_add_del) \
3896 _(POLICER_DUMP, policer_dump) \
3897 _(POLICER_CLASSIFY_SET_INTERFACE, policer_classify_set_interface) \
3898 _(POLICER_CLASSIFY_DUMP, policer_classify_dump) \
3899 _(IP_SOURCE_AND_PORT_RANGE_CHECK_ADD_DEL, \
3900  ip_source_and_port_range_check_add_del) \
3901 _(IP_SOURCE_AND_PORT_RANGE_CHECK_INTERFACE_ADD_DEL, \
3902  ip_source_and_port_range_check_interface_add_del) \
3903 _(LISP_ENABLE_DISABLE, lisp_enable_disable) \
3904 _(GPE_ENABLE_DISABLE, gpe_enable_disable) \
3905 _(GPE_ADD_DEL_IFACE, gpe_add_del_iface) \
3906 _(LISP_PITR_SET_LOCATOR_SET, lisp_pitr_set_locator_set) \
3907 _(LISP_MAP_REQUEST_MODE, lisp_map_request_mode) \
3908 _(SHOW_LISP_MAP_REQUEST_MODE, show_lisp_map_request_mode) \
3909 _(LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping) \
3910 _(LISP_ADD_DEL_ADJACENCY, lisp_add_del_adjacency) \
3911 _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS, \
3912  lisp_add_del_map_request_itr_rlocs) \
3913 _(LISP_EID_TABLE_ADD_DEL_MAP, lisp_eid_table_add_del_map) \
3914 _(LISP_ADD_DEL_LOCAL_EID, lisp_add_del_local_eid) \
3915 _(GPE_ADD_DEL_FWD_ENTRY, gpe_add_del_fwd_entry) \
3916 _(LISP_ADD_DEL_LOCATOR_SET, lisp_add_del_locator_set) \
3917 _(LISP_ADD_DEL_MAP_RESOLVER, lisp_add_del_map_resolver) \
3918 _(LISP_ADD_DEL_LOCATOR, lisp_add_del_locator) \
3919 _(LISP_EID_TABLE_DUMP, lisp_eid_table_dump) \
3920 _(LISP_EID_TABLE_MAP_DUMP, lisp_eid_table_map_dump) \
3921 _(LISP_EID_TABLE_VNI_DUMP, lisp_eid_table_vni_dump) \
3922 _(LISP_MAP_RESOLVER_DUMP, lisp_map_resolver_dump) \
3923 _(LISP_MAP_SERVER_DUMP, lisp_map_server_dump) \
3924 _(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump) \
3925 _(LISP_LOCATOR_DUMP, lisp_locator_dump) \
3926 _(LISP_ADJACENCIES_GET, lisp_adjacencies_get) \
3927 _(SHOW_LISP_RLOC_PROBE_STATE, show_lisp_rloc_probe_state) \
3928 _(SHOW_LISP_MAP_REGISTER_STATE, show_lisp_map_register_state) \
3929 _(LISP_RLOC_PROBE_ENABLE_DISABLE, lisp_rloc_probe_enable_disable) \
3930 _(LISP_MAP_REGISTER_ENABLE_DISABLE, lisp_map_register_enable_disable) \
3931 _(IPSEC_INTERFACE_ADD_DEL_SPD, ipsec_interface_add_del_spd) \
3932 _(IPSEC_SAD_ENTRY_ADD_DEL, ipsec_sad_entry_add_del) \
3933 _(IPSEC_SPD_ADD_DEL, ipsec_spd_add_del) \
3934 _(IPSEC_SPD_ENTRY_ADD_DEL, ipsec_spd_entry_add_del) \
3935 _(IPSEC_TUNNEL_IF_ADD_DEL, ipsec_tunnel_if_add_del) \
3936 _(DELETE_SUBIF, delete_subif) \
3937 _(L2_INTERFACE_PBB_TAG_REWRITE, l2_interface_pbb_tag_rewrite) \
3938 _(SET_PUNT, set_punt) \
3939 _(FLOW_CLASSIFY_SET_INTERFACE, flow_classify_set_interface) \
3940 _(FLOW_CLASSIFY_DUMP, flow_classify_dump) \
3941 _(GET_FIRST_MSG_ID, get_first_msg_id) \
3942 _(IOAM_ENABLE, ioam_enable) \
3943 _(IOAM_DISABLE, ioam_disable) \
3944 _(IP_TABLE_DUMP, ip_table_dump) \
3945 _(IP_ROUTE_DUMP, ip_route_dump) \
3946 _(FEATURE_ENABLE_DISABLE, feature_enable_disable) \
3947 _(SW_INTERFACE_TAG_ADD_DEL, sw_interface_tag_add_del) \
3948 _(HW_INTERFACE_SET_MTU, hw_interface_set_mtu) \
3949 _(P2P_ETHERNET_ADD, p2p_ethernet_add) \
3950 _(P2P_ETHERNET_DEL, p2p_ethernet_del) \
3951 _(TCP_CONFIGURE_SRC_ADDRESSES, tcp_configure_src_addresses) \
3952 _(APP_NAMESPACE_ADD_DEL, app_namespace_add_del) \
3953 _(LLDP_CONFIG, lldp_config) \
3954 _(SW_INTERFACE_SET_LLDP, sw_interface_set_lldp) \
3955 _(SESSION_RULE_ADD_DEL, session_rule_add_del) \
3956 _(OUTPUT_ACL_SET_INTERFACE, output_acl_set_interface) \
3957 _(QOS_RECORD_ENABLE_DISABLE, qos_record_enable_disable) \
3958 _(MEMCLNT_KEEPALIVE_REPLY, memclnt_keepalive_reply)
3959 
3960 void
3962 {
3963 #define _(n,f) am->msg_print_handlers[VL_API_##n] \
3964  = (void *) vl_api_##f##_t_print;
3966 #undef _
3967 }
3968 
3969 /*
3970  * fd.io coding-style-patch-verification: ON
3971  *
3972  * Local Variables:
3973  * eval: (c-set-style "gnu")
3974  * End:
3975  */
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:2895
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:2944
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:2880
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:404
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:295
static void * vl_api_lisp_locator_set_dump_t_print(vl_api_lisp_locator_set_dump_t *mp, void *handle)
Definition: custom_dump.c:3087
static void * vl_api_lisp_map_request_mode_t_print(vl_api_lisp_map_request_mode_t *mp, void *handle)
Definition: custom_dump.c:3115
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:505
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:3070
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:2028
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:3502
static void * vl_api_lisp_adjacencies_get_t_print(vl_api_lisp_adjacencies_get_t *mp, void *handle)
Definition: custom_dump.c:3189
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:3553
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:3429
static void * vl_api_interface_name_renumber_t_print(vl_api_interface_name_renumber_t *mp, void *handle)
Definition: custom_dump.c:2132
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
static void * vl_api_ip_table_dump_t_print(vl_api_ip_table_dump_t *mp, void *handle)
Definition: custom_dump.c:2561
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:2975
static __clib_unused void * vl_api_show_threads_t_print(vl_api_show_threads_t *mp, void *handle)
Definition: custom_dump.c:2075
Interface set vxlan-bypass request.
Definition: vxlan.api:81
add/del session rule
Definition: session.api:404
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:2233
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:1997
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:3055
#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:3200
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:2551
#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:3471
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:2007
static void * vl_api_sw_interface_clear_stats_t_print(vl_api_sw_interface_clear_stats_t *mp, void *handle)
Definition: custom_dump.c:2518
clib_memset(h->entries, 0, sizeof(h->entries[0])*entries)
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:3682
static void * vl_api_output_acl_set_interface_t_print(vl_api_output_acl_set_interface_t *mp, void *handle)
Definition: custom_dump.c:2251
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:2085
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:443
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:2281
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:2855
#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:2054
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:3592
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:2120
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:2670
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:3161
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:2044
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:2361
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:2750
u32 feature_bitmap
Definition: l2.api:212
vl_api_address_t local_ip
Definition: ipsec.api:442
add/del application namespace
Definition: session.api:362
static void * vl_api_ip_address_dump_t_print(vl_api_ip_address_dump_t *mp, void *handle)
Definition: custom_dump.c:2269
static void * vl_api_qos_record_enable_disable_t_print(vl_api_qos_record_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:3716
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:2463
#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:2018
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:2657
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:3136
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:2218
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:3295
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:2204
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:2805
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:295