FD.io VPP  v17.01-9-ge7dcee4
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.
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the 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,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *------------------------------------------------------------------
18  */
19 
20 #include <vnet/vnet.h>
21 #include <vnet/ip/ip.h>
22 #include <vnet/unix/tuntap.h>
23 #include <vnet/mpls/mpls.h>
24 #include <vnet/dhcp/proxy.h>
25 #include <vnet/dhcpv6/proxy.h>
26 #include <vnet/l2tp/l2tp.h>
27 #include <vnet/l2/l2_input.h>
28 #include <vnet/sr/sr_packet.h>
31 #include <vnet/policer/xlate.h>
32 #include <vnet/policer/policer.h>
34 #include <vlib/vlib.h>
35 #include <vlib/unix/unix.h>
36 #include <vlibapi/api.h>
37 #include <vlibmemory/api.h>
39 
40 #include <stats/stats.h>
41 #include <oam/oam.h>
42 
43 #include <vnet/ethernet/ethernet.h>
44 #include <vnet/l2/l2_vtr.h>
45 
46 #include <vpp-api/vpe_msg_enum.h>
47 
48 #define vl_typedefs /* define message structures */
49 #include <vpp-api/vpe_all_api_h.h>
50 #undef vl_typedefs
51 
52 #define vl_endianfun /* define message structures */
53 #include <vpp-api/vpe_all_api_h.h>
54 #undef vl_endianfun
55 
56 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
57 
58 #define FINISH \
59  vec_add1 (s, 0); \
60  vl_print (handle, (char *)s); \
61  vec_free (s); \
62  return handle;
63 
64 
66  (vl_api_create_loopback_t * mp, void *handle)
67 {
68  u8 *s;
69 
70  s = format (0, "SCRIPT: create_loopback ");
71  s = format (s, "mac %U ", format_ethernet_address, &mp->mac_address);
72 
73  FINISH;
74 }
75 
77  (vl_api_delete_loopback_t * mp, void *handle)
78 {
79  u8 *s;
80 
81  s = format (0, "SCRIPT: delete_loopback ");
82  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
83 
84  FINISH;
85 }
86 
88  (vl_api_sw_interface_set_flags_t * mp, void *handle)
89 {
90  u8 *s;
91  s = format (0, "SCRIPT: sw_interface_set_flags ");
92 
93  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
94 
95  if (mp->admin_up_down)
96  s = format (s, "admin-up ");
97  else
98  s = format (s, "admin-down ");
99 
100  if (mp->link_up_down)
101  s = format (s, "link-up");
102  else
103  s = format (s, "link-down");
104 
105  FINISH;
106 }
107 
110 {
111  u8 *s;
112 
113  s = format (0, "SCRIPT: sw_interface_add_del_address ");
114 
115  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
116 
117  if (mp->is_ipv6)
118  s = format (s, "%U/%d ", format_ip6_address,
119  (ip6_address_t *) mp->address, mp->address_length);
120  else
121  s = format (s, "%U/%d ", format_ip4_address,
122  (ip4_address_t *) mp->address, mp->address_length);
123 
124  if (mp->is_add == 0)
125  s = format (s, "del ");
126  if (mp->del_all)
127  s = format (s, "del-all ");
128 
129  FINISH;
130 }
131 
133  (vl_api_sw_interface_set_table_t * mp, void *handle)
134 {
135  u8 *s;
136 
137  s = format (0, "SCRIPT: sw_interface_set_table ");
138 
139  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
140 
141  if (mp->vrf_id)
142  s = format (s, "vrf %d ", ntohl (mp->vrf_id));
143 
144  if (mp->is_ipv6)
145  s = format (s, "ipv6 ");
146 
147  FINISH;
148 }
149 
152 {
153  u8 *s;
154 
155  s = format (0, "SCRIPT: sw_interface_set_mpls_enable ");
156 
157  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
158 
159  if (mp->enable == 0)
160  s = format (s, "disable");
161 
162  FINISH;
163 }
164 
166  (vl_api_sw_interface_set_vpath_t * mp, void *handle)
167 {
168  u8 *s;
169 
170  s = format (0, "SCRIPT: sw_interface_set_vpath ");
171 
172  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
173 
174  if (mp->enable)
175  s = format (s, "enable ");
176  else
177  s = format (s, "disable ");
178 
179  FINISH;
180 }
181 
184 {
185  u8 *s;
186 
187  s = format (0, "SCRIPT: sw_interface_set_vxlan_bypass ");
188 
189  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
190 
191  if (mp->is_ipv6)
192  s = format (s, "ip6");
193 
194  if (mp->enable)
195  s = format (s, "enable ");
196  else
197  s = format (s, "disable ");
198 
199  FINISH;
200 }
201 
204 {
205  u8 *s;
206 
207  s = format (0, "SCRIPT: sw_interface_set_l2_xconnect ");
208 
209  s = format (s, "sw_if_index %d ", ntohl (mp->rx_sw_if_index));
210 
211  if (mp->enable)
212  {
213  s = format (s, "tx_sw_if_index %d ", ntohl (mp->tx_sw_if_index));
214  }
215  else
216  s = format (s, "delete ");
217 
218  FINISH;
219 }
220 
223 {
224  u8 *s;
225 
226  s = format (0, "SCRIPT: sw_interface_set_l2_bridge ");
227 
228  s = format (s, "sw_if_index %d ", ntohl (mp->rx_sw_if_index));
229 
230  if (mp->enable)
231  {
232  s = format (s, "bd_id %d shg %d %senable ", ntohl (mp->bd_id),
233  mp->shg, ((mp->bvi) ? "bvi " : " "));
234  }
235  else
236  s = format (s, "disable ");
237 
238  FINISH;
239 }
240 
243 {
244  u8 *s;
245 
246  s = format (0, "SCRIPT: sw_interface_set_dpdk_hqos_pipe ");
247 
248  s = format (s, "sw_if_index %u ", ntohl (mp->sw_if_index));
249 
250  s = format (s, "subport %u pipe %u profile %u ",
251  ntohl (mp->subport), ntohl (mp->pipe), ntohl (mp->profile));
252 
253  FINISH;
254 }
255 
258 {
259  u8 *s;
260 
261  s = format (0, "SCRIPT: sw_interface_set_dpdk_hqos_subport ");
262 
263  s = format (s, "sw_if_index %u ", ntohl (mp->sw_if_index));
264 
265  s =
266  format (s,
267  "subport %u rate %u bkt_size %u tc0 %u tc1 %u tc2 %u tc3 %u period %u",
268  ntohl (mp->subport), ntohl (mp->tb_rate), ntohl (mp->tb_size),
269  ntohl (mp->tc_rate[0]), ntohl (mp->tc_rate[1]),
270  ntohl (mp->tc_rate[2]), ntohl (mp->tc_rate[3]),
271  ntohl (mp->tc_period));
272 
273  FINISH;
274 }
275 
278 {
279  u8 *s;
280 
281  s = format (0, "SCRIPT: sw_interface_set_dpdk_hqos_tctbl ");
282 
283  s = format (s, "sw_if_index %u ", ntohl (mp->sw_if_index));
284 
285  s = format (s, "entry %u tc %u queue %u",
286  ntohl (mp->entry), ntohl (mp->tc), ntohl (mp->queue));
287 
288  FINISH;
289 }
290 
292  (vl_api_bridge_domain_add_del_t * mp, void *handle)
293 {
294  u8 *s;
295 
296  s = format (0, "SCRIPT: bridge_domain_add_del ");
297 
298  s = format (s, "bd_id %d ", ntohl (mp->bd_id));
299 
300  if (mp->is_add)
301  {
302  s = format (s, "flood %d uu-flood %d forward %d learn %d arp-term %d",
303  mp->flood, mp->uu_flood, mp->forward, mp->learn,
304  mp->arp_term);
305  }
306  else
307  s = format (s, "del ");
308 
309  FINISH;
310 }
311 
313  (vl_api_bridge_domain_dump_t * mp, void *handle)
314 {
315  u8 *s;
316  u32 bd_id = ntohl (mp->bd_id);
317 
318  s = format (0, "SCRIPT: bridge_domain_dump ");
319 
320  if (bd_id != ~0)
321  s = format (s, "bd_id %d ", bd_id);
322 
323  FINISH;
324 }
325 
326 static void *vl_api_l2fib_add_del_t_print
327  (vl_api_l2fib_add_del_t * mp, void *handle)
328 {
329  u8 *s;
330 
331  s = format (0, "SCRIPT: l2fib_add_del ");
332 
333  s = format (s, "mac %U ", format_ethernet_address, &mp->mac);
334 
335  s = format (s, "bd_id %d ", ntohl (mp->bd_id));
336 
337 
338  if (mp->is_add)
339  {
340  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
341  if (mp->static_mac)
342  s = format (s, "%s", "static ");
343  if (mp->filter_mac)
344  s = format (s, "%s", "filter ");
345  if (mp->bvi_mac)
346  s = format (s, "%s", "bvi ");
347  }
348  else
349  {
350  s = format (s, "del ");
351  }
352 
353  FINISH;
354 }
355 
356 static void *
358 {
359  u8 *s;
360  u32 flags = ntohl (mp->feature_bitmap);
361 
362  s = format (0, "SCRIPT: l2_flags ");
363 
364  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
365 
366 #define _(a,b) \
367  if (flags & L2INPUT_FEAT_ ## a) s = format (s, #a " ");
369 #undef _
370 
371  FINISH;
372 }
373 
374 static void *vl_api_bridge_flags_t_print
375  (vl_api_bridge_flags_t * mp, void *handle)
376 {
377  u8 *s;
378  u32 flags = ntohl (mp->feature_bitmap);
379 
380  s = format (0, "SCRIPT: bridge_flags ");
381 
382  s = format (s, "bd_id %d ", ntohl (mp->bd_id));
383 
384  if (flags & L2_LEARN)
385  s = format (s, "learn ");
386  if (flags & L2_FWD)
387  s = format (s, "forward ");
388  if (flags & L2_FLOOD)
389  s = format (s, "flood ");
390  if (flags & L2_UU_FLOOD)
391  s = format (s, "uu-flood ");
392  if (flags & L2_ARP_TERM)
393  s = format (s, "arp-term ");
394 
395  if (mp->is_set == 0)
396  s = format (s, "clear ");
397 
398  FINISH;
399 }
400 
402  (vl_api_bd_ip_mac_add_del_t * mp, void *handle)
403 {
404  u8 *s;
405 
406  s = format (0, "SCRIPT: bd_ip_mac_add_del ");
407  s = format (s, "bd_id %d ", ntohl (mp->bd_id));
408 
409  if (mp->is_ipv6)
410  s = format (s, "%U ", format_ip6_address,
411  (ip6_address_t *) mp->ip_address);
412  else
413  s = format (s, "%U ", format_ip4_address,
414  (ip4_address_t *) mp->ip_address);
415 
416  s = format (s, "%U ", format_ethernet_address, mp->mac_address);
417  if (mp->is_add == 0)
418  s = format (s, "del ");
419 
420  FINISH;
421 }
422 
423 static void *vl_api_tap_connect_t_print
424  (vl_api_tap_connect_t * mp, void *handle)
425 {
426  u8 *s;
427  u8 null_mac[6];
428 
429  memset (null_mac, 0, sizeof (null_mac));
430 
431  s = format (0, "SCRIPT: tap_connect ");
432  s = format (s, "tapname %s ", mp->tap_name);
433  if (mp->use_random_mac)
434  s = format (s, "random-mac ");
435  if (mp->tag[0])
436  s = format (s, "tag %s ", mp->tag);
437  if (memcmp (mp->mac_address, null_mac, 6))
438  s = format (s, "mac %U ", format_ethernet_address, mp->mac_address);
439 
440  FINISH;
441 }
442 
443 static void *vl_api_tap_modify_t_print
444  (vl_api_tap_modify_t * mp, void *handle)
445 {
446  u8 *s;
447  u8 null_mac[6];
448 
449  memset (null_mac, 0, sizeof (null_mac));
450 
451  s = format (0, "SCRIPT: tap_modify ");
452  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
453  s = format (s, "tapname %s ", mp->tap_name);
454  if (mp->use_random_mac)
455  s = format (s, "random-mac ");
456 
457  if (memcmp (mp->mac_address, null_mac, 6))
458  s = format (s, "mac %U ", format_ethernet_address, mp->mac_address);
459 
460  FINISH;
461 }
462 
463 static void *vl_api_tap_delete_t_print
464  (vl_api_tap_delete_t * mp, void *handle)
465 {
466  u8 *s;
467 
468  s = format (0, "SCRIPT: tap_delete ");
469  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
470 
471  FINISH;
472 }
473 
475  (vl_api_sw_interface_tap_dump_t * mp, void *handle)
476 {
477  u8 *s;
478 
479  s = format (0, "SCRIPT: sw_interface_tap_dump ");
480 
481  FINISH;
482 }
483 
484 
486  (vl_api_ip_add_del_route_t * mp, void *handle)
487 {
488  u8 *s;
489 
490  s = format (0, "SCRIPT: ip_add_del_route ");
491  if (mp->is_add == 0)
492  s = format (s, "del ");
493 
494  if (mp->next_hop_sw_if_index)
495  s = format (s, "sw_if_index %d ", ntohl (mp->next_hop_sw_if_index));
496 
497  if (mp->is_ipv6)
498  s = format (s, "%U/%d ", format_ip6_address, mp->dst_address,
499  mp->dst_address_length);
500  else
501  s = format (s, "%U/%d ", format_ip4_address, mp->dst_address,
502  mp->dst_address_length);
503  if (mp->is_local)
504  s = format (s, "local ");
505  else if (mp->is_drop)
506  s = format (s, "drop ");
507  else if (mp->is_classify)
508  s = format (s, "classify %d", ntohl (mp->classify_table_index));
509  else
510  {
511  if (mp->is_ipv6)
512  s = format (s, "via %U ", format_ip6_address, mp->next_hop_address);
513  else
514  s = format (s, "via %U ", format_ip4_address, mp->next_hop_address);
515  }
516 
517  if (mp->table_id != 0)
518  s = format (s, "vrf %d ", ntohl (mp->table_id));
519 
520  if (mp->create_vrf_if_needed)
521  s = format (s, "create-vrf ");
522 
523  if (mp->next_hop_weight != 1)
524  s = format (s, "weight %d ", mp->next_hop_weight);
525 
526  if (mp->not_last)
527  s = format (s, "not-last ");
528 
529  if (mp->is_multipath)
530  s = format (s, "multipath ");
531 
532  if (mp->is_multipath)
533  s = format (s, "multipath ");
534 
535  if (mp->next_hop_table_id)
536  s = format (s, "lookup-in-vrf %d ", ntohl (mp->next_hop_table_id));
537 
538  FINISH;
539 }
540 
542  (vl_api_proxy_arp_add_del_t * mp, void *handle)
543 {
544  u8 *s;
545 
546  s = format (0, "SCRIPT: proxy_arp_add_del ");
547 
548  s = format (s, "%U - %U ", format_ip4_address, mp->low_address,
550 
551  if (mp->vrf_id)
552  s = format (s, "vrf %d ", ntohl (mp->vrf_id));
553 
554  if (mp->is_add == 0)
555  s = format (s, "del ");
556 
557  FINISH;
558 }
559 
562 {
563  u8 *s;
564 
565  s = format (0, "SCRIPT: proxy_arp_intfc_enable_disable ");
566 
567  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
568 
569  s = format (s, "enable %d ", mp->enable_disable);
570 
571  FINISH;
572 }
573 
575  (vl_api_mpls_tunnel_add_del_t * mp, void *handle)
576 {
577  u8 *s;
578 
579  s = format (0, "SCRIPT: mpls_tunnel_add_del ");
580 
581  if (mp->mt_next_hop_sw_if_index)
582  s = format (s, "sw_if_index %d ", ntohl (mp->mt_next_hop_sw_if_index));
583 
584  if (mp->mt_next_hop_proto_is_ip4)
585  s = format (s, "%U ", format_ip4_address, mp->mt_next_hop);
586  else
587  s = format (s, "%U ", format_ip6_address, mp->mt_next_hop);
588 
589  if (mp->mt_l2_only)
590  s = format (s, "l2-only ");
591 
592  if (mp->mt_is_add == 0)
593  s = format (s, "del ");
594 
595  FINISH;
596 }
597 
600 {
601  u8 *s;
602 
603  s = format (0, "SCRIPT: sw_interface_set_unnumbered ");
604 
605  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
606 
607  s = format (s, "unnum_if_index %d ", ntohl (mp->unnumbered_sw_if_index));
608 
609  if (mp->is_add == 0)
610  s = format (s, "del ");
611 
612  FINISH;
613 }
614 
616  (vl_api_ip_neighbor_add_del_t * mp, void *handle)
617 {
618  u8 *s;
619  u8 null_mac[6];
620 
621  memset (null_mac, 0, sizeof (null_mac));
622 
623  s = format (0, "SCRIPT: ip_neighbor_add_del ");
624 
625  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
626 
627  if (mp->is_static)
628  s = format (s, "is_static ");
629 
630  s = format (s, "vrf_id %d ", ntohl (mp->vrf_id));
631 
632  if (memcmp (mp->mac_address, null_mac, 6))
633  s = format (s, "mac %U ", format_ethernet_address, mp->mac_address);
634 
635  if (mp->is_ipv6)
636  s =
637  format (s, "dst %U ", format_ip6_address,
638  (ip6_address_t *) mp->dst_address);
639  else
640  s =
641  format (s, "dst %U ", format_ip4_address,
642  (ip4_address_t *) mp->dst_address);
643 
644  if (mp->is_add == 0)
645  s = format (s, "del ");
646 
647  FINISH;
648 }
649 
650 static void *
652 {
653  u8 *s;
654 
655  s = format (0, "SCRIPT: reset_vrf ");
656 
657  if (mp->vrf_id)
658  s = format (s, "vrf %d ", ntohl (mp->vrf_id));
659 
660  if (mp->is_ipv6 != 0)
661  s = format (s, "ipv6 ");
662 
663  FINISH;
664 }
665 
667  (vl_api_create_vlan_subif_t * mp, void *handle)
668 {
669  u8 *s;
670 
671  s = format (0, "SCRIPT: create_vlan_subif ");
672 
673  if (mp->sw_if_index)
674  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
675 
676  if (mp->vlan_id)
677  s = format (s, "vlan_id %d ", ntohl (mp->vlan_id));
678 
679  FINISH;
680 }
681 
682 #define foreach_create_subif_bit \
683 _(no_tags) \
684 _(one_tag) \
685 _(two_tags) \
686 _(dot1ad) \
687 _(exact_match) \
688 _(default_sub) \
689 _(outer_vlan_id_any) \
690 _(inner_vlan_id_any)
691 
692 static void *vl_api_create_subif_t_print
693  (vl_api_create_subif_t * mp, void *handle)
694 {
695  u8 *s;
696 
697  s = format (0, "SCRIPT: create_subif ");
698 
699  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
700 
701  s = format (s, "sub_id %d ", ntohl (mp->sub_id));
702 
703  if (mp->outer_vlan_id)
704  s = format (s, "outer_vlan_id %d ", ntohs (mp->outer_vlan_id));
705 
706  if (mp->inner_vlan_id)
707  s = format (s, "inner_vlan_id %d ", ntohs (mp->inner_vlan_id));
708 
709 #define _(a) if (mp->a) s = format (s, "%s ", #a);
711 #undef _
712 
713  FINISH;
714 }
715 
716 static void *vl_api_delete_subif_t_print
717  (vl_api_delete_subif_t * mp, void *handle)
718 {
719  u8 *s;
720 
721  s = format (0, "SCRIPT: delete_subif ");
722  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
723 
724  FINISH;
725 }
726 
727 static void *vl_api_oam_add_del_t_print
728  (vl_api_oam_add_del_t * mp, void *handle)
729 {
730  u8 *s;
731 
732  s = format (0, "SCRIPT: oam_add_del ");
733 
734  if (mp->vrf_id)
735  s = format (s, "vrf %d ", ntohl (mp->vrf_id));
736 
737  s = format (s, "src %U ", format_ip4_address, mp->src_address);
738 
739  s = format (s, "dst %U ", format_ip4_address, mp->dst_address);
740 
741  if (mp->is_add == 0)
742  s = format (s, "del ");
743 
744  FINISH;
745 }
746 
747 static void *
749 {
750  u8 *s;
751 
752  s = format (0, "SCRIPT: reset_fib ");
753 
754  if (mp->vrf_id)
755  s = format (s, "vrf %d ", ntohl (mp->vrf_id));
756 
757  if (mp->is_ipv6 != 0)
758  s = format (s, "ipv6 ");
759 
760  FINISH;
761 }
762 
764  (vl_api_dhcp_proxy_config_t * mp, void *handle)
765 {
766  u8 *s;
767 
768  s = format (0, "SCRIPT: dhcp_proxy_config ");
769 
770  s = format (s, "vrf_id %d ", ntohl (mp->vrf_id));
771 
772  if (mp->is_ipv6)
773  {
774  s = format (s, "svr %U ", format_ip6_address,
775  (ip6_address_t *) mp->dhcp_server);
776  s = format (s, "src %U ", format_ip6_address,
778  }
779  else
780  {
781  s = format (s, "svr %U ", format_ip4_address,
782  (ip4_address_t *) mp->dhcp_server);
783  s = format (s, "src %U ", format_ip4_address,
785  }
786  if (mp->is_add == 0)
787  s = format (s, "del ");
788 
789  s = format (s, "insert-cid %d ", mp->insert_circuit_id);
790 
791  FINISH;
792 }
793 
795  (vl_api_dhcp_proxy_config_2_t * mp, void *handle)
796 {
797  u8 *s;
798 
799  s = format (0, "SCRIPT: dhcp_proxy_config_2 ");
800 
801  s = format (s, "rx_vrf_id %d ", ntohl (mp->rx_vrf_id));
802  s = format (s, "server_vrf_id %d ", ntohl (mp->server_vrf_id));
803 
804  if (mp->is_ipv6)
805  {
806  s = format (s, "svr %U ", format_ip6_address,
807  (ip6_address_t *) mp->dhcp_server);
808  s = format (s, "src %U ", format_ip6_address,
810  }
811  else
812  {
813  s = format (s, "svr %U ", format_ip4_address,
814  (ip4_address_t *) mp->dhcp_server);
815  s = format (s, "src %U ", format_ip4_address,
817  }
818  if (mp->is_add == 0)
819  s = format (s, "del ");
820 
821  s = format (s, "insert-cid %d ", mp->insert_circuit_id);
822 
823  FINISH;
824 }
825 
827  (vl_api_dhcp_proxy_set_vss_t * mp, void *handle)
828 {
829  u8 *s;
830 
831  s = format (0, "SCRIPT: dhcp_proxy_set_vss ");
832 
833  s = format (s, "tbl_id %d ", ntohl (mp->tbl_id));
834 
835  s = format (s, "fib_id %d ", ntohl (mp->fib_id));
836 
837  s = format (s, "oui %d ", ntohl (mp->oui));
838 
839  if (mp->is_ipv6 != 0)
840  s = format (s, "ipv6 ");
841 
842  if (mp->is_add == 0)
843  s = format (s, "del ");
844 
845  FINISH;
846 }
847 
849  (vl_api_dhcp_client_config_t * mp, void *handle)
850 {
851  u8 *s;
852 
853  s = format (0, "SCRIPT: dhcp_client_config ");
854 
855  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
856 
857  s = format (s, "hostname %s ", mp->hostname);
858 
859  s = format (s, "want_dhcp_event %d ", mp->want_dhcp_event);
860 
861  s = format (s, "pid %d ", mp->pid);
862 
863  if (mp->is_add == 0)
864  s = format (s, "del ");
865 
866  FINISH;
867 }
868 
869 
871  (vl_api_set_ip_flow_hash_t * mp, void *handle)
872 {
873  u8 *s;
874 
875  s = format (0, "SCRIPT: set_ip_flow_hash ");
876 
877  s = format (s, "vrf_id %d ", ntohl (mp->vrf_id));
878 
879  if (mp->src)
880  s = format (s, "src ");
881 
882  if (mp->dst)
883  s = format (s, "dst ");
884 
885  if (mp->sport)
886  s = format (s, "sport ");
887 
888  if (mp->dport)
889  s = format (s, "dport ");
890 
891  if (mp->proto)
892  s = format (s, "proto ");
893 
894  if (mp->reverse)
895  s = format (s, "reverse ");
896 
897  if (mp->is_ipv6 != 0)
898  s = format (s, "ipv6 ");
899 
900  FINISH;
901 }
902 
905 {
906  u8 *s;
907 
908  s = format (0, "SCRIPT: sw_interface_ip6_set_link_local_address ");
909 
910  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
911 
912  s = format (s, "%U/%d ", format_ip6_address, mp->address,
913  mp->address_length);
914 
915  FINISH;
916 }
917 
920 {
921  u8 *s;
922 
923  s = format (0, "SCRIPT: sw_interface_ip6nd_ra_prefix ");
924 
925  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
926 
927  s = format (s, "%U/%d ", format_ip6_address, mp->address,
928  mp->address_length);
929 
930  s = format (s, "val_life %d ", ntohl (mp->val_lifetime));
931 
932  s = format (s, "pref_life %d ", ntohl (mp->pref_lifetime));
933 
934  if (mp->use_default)
935  s = format (s, "def ");
936 
937  if (mp->no_advertise)
938  s = format (s, "noadv ");
939 
940  if (mp->off_link)
941  s = format (s, "offl ");
942 
943  if (mp->no_autoconfig)
944  s = format (s, "noauto ");
945 
946  if (mp->no_onlink)
947  s = format (s, "nolink ");
948 
949  if (mp->is_no)
950  s = format (s, "isno ");
951 
952  FINISH;
953 }
954 
957 {
958  u8 *s;
959 
960  s = format (0, "SCRIPT: sw_interface_ip6nd_ra_config ");
961 
962  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
963 
964  s = format (s, "maxint %d ", ntohl (mp->max_interval));
965 
966  s = format (s, "minint %d ", ntohl (mp->min_interval));
967 
968  s = format (s, "life %d ", ntohl (mp->lifetime));
969 
970  s = format (s, "count %d ", ntohl (mp->initial_count));
971 
972  s = format (s, "interval %d ", ntohl (mp->initial_interval));
973 
974  if (mp->suppress)
975  s = format (s, "suppress ");
976 
977  if (mp->managed)
978  s = format (s, "managed ");
979 
980  if (mp->other)
981  s = format (s, "other ");
982 
983  if (mp->ll_option)
984  s = format (s, "ll ");
985 
986  if (mp->send_unicast)
987  s = format (s, "send ");
988 
989  if (mp->cease)
990  s = format (s, "cease ");
991 
992  if (mp->is_no)
993  s = format (s, "isno ");
994 
995  if (mp->default_router)
996  s = format (s, "def ");
997 
998  FINISH;
999 }
1000 
1002  (vl_api_set_arp_neighbor_limit_t * mp, void *handle)
1003 {
1004  u8 *s;
1005 
1006  s = format (0, "SCRIPT: set_arp_neighbor_limit ");
1007 
1008  s = format (s, "arp_nbr_limit %d ", ntohl (mp->arp_neighbor_limit));
1009 
1010  if (mp->is_ipv6 != 0)
1011  s = format (s, "ipv6 ");
1012 
1013  FINISH;
1014 }
1015 
1017  (vl_api_l2_patch_add_del_t * mp, void *handle)
1018 {
1019  u8 *s;
1020 
1021  s = format (0, "SCRIPT: l2_patch_add_del ");
1022 
1023  s = format (s, "rx_sw_if_index %d ", ntohl (mp->rx_sw_if_index));
1024 
1025  s = format (s, "tx_sw_if_index %d ", ntohl (mp->tx_sw_if_index));
1026 
1027  if (mp->is_add == 0)
1028  s = format (s, "del ");
1029 
1030  FINISH;
1031 }
1032 
1034  (vl_api_sr_tunnel_add_del_t * mp, void *handle)
1035 {
1036  u8 *s;
1037  ip6_address_t *this_address;
1038  int i;
1039  u16 flags_host_byte_order;
1040  u8 pl_flag;
1041 
1042  s = format (0, "SCRIPT: sr_tunnel_add_del ");
1043 
1044  if (mp->name[0])
1045  s = format (s, "name %s ", mp->name);
1046 
1047  s = format (s, "src %U dst %U/%d ", format_ip6_address,
1048  (ip6_address_t *) mp->src_address,
1051 
1052  this_address = (ip6_address_t *) mp->segs_and_tags;
1053  for (i = 0; i < mp->n_segments; i++)
1054  {
1055  s = format (s, "next %U ", format_ip6_address, this_address);
1056  this_address++;
1057  }
1058  for (i = 0; i < mp->n_tags; i++)
1059  {
1060  s = format (s, "tag %U ", format_ip6_address, this_address);
1061  this_address++;
1062  }
1063 
1064  flags_host_byte_order = clib_net_to_host_u16 (mp->flags_net_byte_order);
1065 
1066  if (flags_host_byte_order & IP6_SR_HEADER_FLAG_CLEANUP)
1067  s = format (s, " clean ");
1068 
1069  if (flags_host_byte_order & IP6_SR_HEADER_FLAG_PROTECTED)
1070  s = format (s, "protected ");
1071 
1072  for (i = 1; i <= 4; i++)
1073  {
1074  pl_flag = ip6_sr_policy_list_flags (flags_host_byte_order, i);
1075 
1076  switch (pl_flag)
1077  {
1079  continue;
1080 
1082  s = format (s, "InPE %d ", i);
1083  break;
1084 
1086  s = format (s, "EgPE %d ", i);
1087  break;
1088 
1090  s = format (s, "OrgSrc %d ", i);
1091  break;
1092 
1093  default:
1094  clib_warning ("BUG: pl elt %d value %d", i, pl_flag);
1095  break;
1096  }
1097  }
1098 
1099  if (mp->policy_name[0])
1100  s = format (s, "policy_name %s ", mp->policy_name);
1101 
1102  if (mp->is_add == 0)
1103  s = format (s, "del ");
1104 
1105  FINISH;
1106 }
1107 
1109  (vl_api_sr_policy_add_del_t * mp, void *handle)
1110 {
1111  u8 *s;
1112  int i;
1113 
1114  s = format (0, "SCRIPT: sr_policy_add_del ");
1115 
1116  if (mp->name[0])
1117  s = format (s, "name %s ", mp->name);
1118 
1119 
1120  if (mp->tunnel_names[0])
1121  {
1122  // start deserializing tunnel_names
1123  int num_tunnels = mp->tunnel_names[0]; //number of tunnels
1124  u8 *deser_tun_names = mp->tunnel_names;
1125  deser_tun_names += 1; //moving along
1126 
1127  u8 *tun_name = 0;
1128  int tun_name_len = 0;
1129 
1130  for (i = 0; i < num_tunnels; i++)
1131  {
1132  tun_name_len = *deser_tun_names;
1133  deser_tun_names += 1;
1134  vec_resize (tun_name, tun_name_len);
1135  memcpy (tun_name, deser_tun_names, tun_name_len);
1136  s = format (s, "tunnel %s ", tun_name);
1137  deser_tun_names += tun_name_len;
1138  tun_name = 0;
1139  }
1140  }
1141 
1142  if (mp->is_add == 0)
1143  s = format (s, "del ");
1144 
1145  FINISH;
1146 }
1147 
1150 {
1151 
1152  u8 *s = 0;
1153  /* int i; */
1154 
1155  s = format (0, "SCRIPT: sr_multicast_map_add_del ");
1156 
1157  if (mp->multicast_address[0])
1158  s = format (s, "address %U ", format_ip6_address, &mp->multicast_address);
1159 
1160  if (mp->policy_name[0])
1161  s = format (s, "sr-policy %s ", &mp->policy_name);
1162 
1163 
1164  if (mp->is_add == 0)
1165  s = format (s, "del ");
1166 
1167  FINISH;
1168 }
1169 
1170 
1172  (vl_api_classify_add_del_table_t * mp, void *handle)
1173 {
1174  u8 *s;
1175  int i;
1176 
1177  s = format (0, "SCRIPT: classify_add_del_table ");
1178 
1179  if (mp->is_add == 0)
1180  {
1181  s = format (s, "table %d ", ntohl (mp->table_index));
1182  s = format (s, "%s ", mp->del_chain ? "del-chain" : "del");
1183  }
1184  else
1185  {
1186  s = format (s, "nbuckets %d ", ntohl (mp->nbuckets));
1187  s = format (s, "memory_size %d ", ntohl (mp->memory_size));
1188  s = format (s, "skip %d ", ntohl (mp->skip_n_vectors));
1189  s = format (s, "match %d ", ntohl (mp->match_n_vectors));
1190  s = format (s, "next-table %d ", ntohl (mp->next_table_index));
1191  s = format (s, "miss-next %d ", ntohl (mp->miss_next_index));
1192  s = format (s, "current-data-flag %d ", ntohl (mp->current_data_flag));
1193  if (mp->current_data_flag)
1194  s = format (s, "current-data-offset %d ",
1195  ntohl (mp->current_data_offset));
1196  s = format (s, "mask hex ");
1197  for (i = 0; i < ntohl (mp->match_n_vectors) * sizeof (u32x4); i++)
1198  s = format (s, "%02x", mp->mask[i]);
1199  vec_add1 (s, ' ');
1200  }
1201 
1202  FINISH;
1203 }
1204 
1207 {
1208  u8 *s;
1209  int i, limit = 0;
1210 
1211  s = format (0, "SCRIPT: classify_add_del_session ");
1212 
1213  s = format (s, "table_index %d ", ntohl (mp->table_index));
1214  s = format (s, "hit_next_index %d ", ntohl (mp->hit_next_index));
1215  s = format (s, "opaque_index %d ", ntohl (mp->opaque_index));
1216  s = format (s, "advance %d ", ntohl (mp->advance));
1217  s = format (s, "action %d ", mp->action);
1218  if (mp->action)
1219  s = format (s, "metadata %d ", ntohl (mp->metadata));
1220  if (mp->is_add == 0)
1221  s = format (s, "del ");
1222 
1223  s = format (s, "match hex ");
1224  for (i = 5 * sizeof (u32x4) - 1; i > 0; i--)
1225  {
1226  if (mp->match[i] != 0)
1227  {
1228  limit = i + 1;
1229  break;
1230  }
1231  }
1232 
1233  for (i = 0; i < limit; i++)
1234  s = format (s, "%02x", mp->match[i]);
1235 
1236  FINISH;
1237 }
1238 
1241 {
1242  u8 *s;
1243 
1244  s = format (0, "SCRIPT: classify_set_interface_ip_table ");
1245 
1246  if (mp->is_ipv6)
1247  s = format (s, "ipv6 ");
1248 
1249  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1250  s = format (s, "table %d ", ntohl (mp->table_index));
1251 
1252  FINISH;
1253 }
1254 
1257 {
1258  u8 *s;
1259 
1260  s = format (0, "SCRIPT: classify_set_interface_l2_tables ");
1261 
1262  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1263  s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index));
1264  s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index));
1265  s = format (s, "other-table %d ", ntohl (mp->other_table_index));
1266  s = format (s, "is-input %d ", mp->is_input);
1267 
1268  FINISH;
1269 }
1270 
1271 static void *vl_api_add_node_next_t_print
1272  (vl_api_add_node_next_t * mp, void *handle)
1273 {
1274  u8 *s;
1275 
1276  s = format (0, "SCRIPT: add_node_next ");
1277 
1278  s = format (0, "node %s next %s ", mp->node_name, mp->next_name);
1279 
1280  FINISH;
1281 }
1282 
1284  (vl_api_l2tpv3_create_tunnel_t * mp, void *handle)
1285 {
1286  u8 *s;
1287 
1288  s = format (0, "SCRIPT: l2tpv3_create_tunnel ");
1289 
1290  s = format (s, "client_address %U our_address %U ",
1293  s = format (s, "local_session_id %d ", ntohl (mp->local_session_id));
1294  s = format (s, "remote_session_id %d ", ntohl (mp->remote_session_id));
1295  s = format (s, "local_cookie %lld ",
1296  clib_net_to_host_u64 (mp->local_cookie));
1297  s = format (s, "remote_cookie %lld ",
1298  clib_net_to_host_u64 (mp->remote_cookie));
1299  if (mp->l2_sublayer_present)
1300  s = format (s, "l2-sublayer-present ");
1301 
1302  FINISH;
1303 }
1304 
1307 {
1308  u8 *s;
1309 
1310  s = format (0, "SCRIPT: l2tpv3_set_tunnel_cookies ");
1311 
1312  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1313 
1314  s = format (s, "new_local_cookie %llu ",
1315  clib_net_to_host_u64 (mp->new_local_cookie));
1316 
1317  s = format (s, "new_remote_cookie %llu ",
1318  clib_net_to_host_u64 (mp->new_remote_cookie));
1319 
1320  FINISH;
1321 }
1322 
1325 {
1326  u8 *s;
1327 
1328  s = format (0, "SCRIPT: l2tpv3_interface_enable_disable ");
1329 
1330  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1331 
1332  if (mp->enable_disable == 0)
1333  s = format (s, "del ");
1334 
1335  FINISH;
1336 }
1337 
1339  (vl_api_l2tpv3_set_lookup_key_t * mp, void *handle)
1340 {
1341  u8 *s;
1342  char *str = "unknown";
1343 
1344  s = format (0, "SCRIPT: l2tpv3_set_lookup_key ");
1345 
1346  switch (mp->key)
1347  {
1349  str = "lookup_v6_src";
1350  break;
1352  str = "lookup_v6_dst";
1353  break;
1354  case L2T_LOOKUP_SESSION_ID:
1355  str = "lookup_session_id";
1356  break;
1357  default:
1358  break;
1359  }
1360 
1361  s = format (s, "%s ", str);
1362 
1363  FINISH;
1364 }
1365 
1368 {
1369  u8 *s;
1370 
1371  s = format (0, "SCRIPT: sw_if_l2tpv3_tunnel_dump ");
1372 
1373  FINISH;
1374 }
1375 
1377  (vl_api_vxlan_add_del_tunnel_t * mp, void *handle)
1378 {
1379  u8 *s;
1380  s = format (0, "SCRIPT: vxlan_add_del_tunnel ");
1381 
1382  ip46_address_t src, dst;
1383 
1384  ip46_from_addr_buf (mp->is_ipv6, mp->dst_address, &dst);
1385  ip46_from_addr_buf (mp->is_ipv6, mp->src_address, &src);
1386 
1387  u8 is_grp = ip46_address_is_multicast (&dst);
1388  char *dst_name = is_grp ? "group" : "dst";
1389 
1390  s = format (s, "src %U ", format_ip46_address, &src, IP46_TYPE_ANY);
1391  s = format (s, "%s %U ", dst_name, format_ip46_address,
1392  &dst, IP46_TYPE_ANY);
1393 
1394  if (is_grp)
1395  s = format (s, "mcast_sw_if_index %d ", ntohl (mp->mcast_sw_if_index));
1396 
1397  if (mp->encap_vrf_id)
1398  s = format (s, "encap-vrf-id %d ", ntohl (mp->encap_vrf_id));
1399 
1400  s = format (s, "decap-next %d ", ntohl (mp->decap_next_index));
1401 
1402  s = format (s, "vni %d ", ntohl (mp->vni));
1403 
1404  if (mp->is_add == 0)
1405  s = format (s, "del ");
1406 
1407  if (mp->is_add == 0)
1408  s = format (s, "del ");
1409 
1410  FINISH;
1411 }
1412 
1414  (vl_api_vxlan_tunnel_dump_t * mp, void *handle)
1415 {
1416  u8 *s;
1417 
1418  s = format (0, "SCRIPT: vxlan_tunnel_dump ");
1419 
1420  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1421 
1422  FINISH;
1423 }
1424 
1426  (vl_api_gre_add_del_tunnel_t * mp, void *handle)
1427 {
1428  u8 *s;
1429 
1430  s = format (0, "SCRIPT: gre_add_del_tunnel ");
1431 
1432  s = format (s, "dst %U ", format_ip46_address,
1433  (ip46_address_t *) & (mp->dst_address),
1435 
1436  s = format (s, "src %U ", format_ip46_address,
1437  (ip46_address_t *) & (mp->src_address),
1438  mp->is_ipv6 ? IP46_TYPE_IP6 : IP46_TYPE_IP4);
1439 
1440  if (mp->teb)
1441  s = format (s, "teb ");
1442 
1443  if (mp->outer_fib_id)
1444  s = format (s, "outer-fib-id %d ", ntohl (mp->outer_fib_id));
1445 
1446  if (mp->is_add == 0)
1447  s = format (s, "del ");
1448 
1449  FINISH;
1450 }
1451 
1452 static void *vl_api_gre_tunnel_dump_t_print
1453  (vl_api_gre_tunnel_dump_t * mp, void *handle)
1454 {
1455  u8 *s;
1456 
1457  s = format (0, "SCRIPT: gre_tunnel_dump ");
1458 
1459  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1460 
1461  FINISH;
1462 }
1463 
1465  (vl_api_l2_fib_clear_table_t * mp, void *handle)
1466 {
1467  u8 *s;
1468 
1469  s = format (0, "SCRIPT: l2_fib_clear_table ");
1470 
1471  FINISH;
1472 }
1473 
1476 {
1477  u8 *s;
1478 
1479  s = format (0, "SCRIPT: l2_interface_efp_filter ");
1480 
1481  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1482  if (mp->enable_disable)
1483  s = format (s, "enable ");
1484  else
1485  s = format (s, "disable ");
1486 
1487  FINISH;
1488 }
1489 
1492 {
1493  u8 *s;
1494 
1495  s = format (0, "SCRIPT: l2_interface_vlan_tag_rewrite ");
1496 
1497  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1498  s = format (s, "vtr_op %d ", ntohl (mp->vtr_op));
1499  s = format (s, "push_dot1q %d ", ntohl (mp->push_dot1q));
1500  s = format (s, "tag1 %d ", ntohl (mp->tag1));
1501  s = format (s, "tag2 %d ", ntohl (mp->tag2));
1502 
1503  FINISH;
1504 }
1505 
1507  (vl_api_create_vhost_user_if_t * mp, void *handle)
1508 {
1509  u8 *s;
1510 
1511  s = format (0, "SCRIPT: create_vhost_user_if ");
1512 
1513  s = format (s, "socket %s ", mp->sock_filename);
1514  if (mp->is_server)
1515  s = format (s, "server ");
1516  if (mp->renumber)
1517  s = format (s, "renumber %d ", ntohl (mp->custom_dev_instance));
1518  if (mp->tag[0])
1519  s = format (s, "tag %s", mp->tag);
1520 
1521  FINISH;
1522 }
1523 
1525  (vl_api_modify_vhost_user_if_t * mp, void *handle)
1526 {
1527  u8 *s;
1528 
1529  s = format (0, "SCRIPT: modify_vhost_user_if ");
1530 
1531  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1532  s = format (s, "socket %s ", mp->sock_filename);
1533  if (mp->is_server)
1534  s = format (s, "server ");
1535  if (mp->renumber)
1536  s = format (s, "renumber %d ", ntohl (mp->custom_dev_instance));
1537 
1538  FINISH;
1539 }
1540 
1542  (vl_api_delete_vhost_user_if_t * mp, void *handle)
1543 {
1544  u8 *s;
1545 
1546  s = format (0, "SCRIPT: delete_vhost_user_if ");
1547  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1548 
1549  FINISH;
1550 }
1551 
1554 {
1555  u8 *s;
1556 
1557  s = format (0, "SCRIPT: sw_interface_vhost_user_dump ");
1558 
1559  FINISH;
1560 }
1561 
1563  (vl_api_sw_interface_dump_t * mp, void *handle)
1564 {
1565  u8 *s;
1566 
1567  s = format (0, "SCRIPT: sw_interface_dump ");
1568 
1569  if (mp->name_filter_valid)
1570  s = format (s, "name_filter %s ", mp->name_filter);
1571  else
1572  s = format (s, "all ");
1573 
1574  FINISH;
1575 }
1576 
1578  (vl_api_l2_fib_table_dump_t * mp, void *handle)
1579 {
1580  u8 *s;
1581 
1582  s = format (0, "SCRIPT: l2_fib_table_dump ");
1583 
1584  s = format (s, "bd_id %d ", ntohl (mp->bd_id));
1585 
1586  FINISH;
1587 }
1588 
1589 static void *vl_api_control_ping_t_print
1590  (vl_api_control_ping_t * mp, void *handle)
1591 {
1592  u8 *s;
1593 
1594  s = format (0, "SCRIPT: control_ping ");
1595 
1596  FINISH;
1597 }
1598 
1600  (vl_api_want_interface_events_t * mp, void *handle)
1601 {
1602  u8 *s;
1603 
1604  s = format (0, "SCRIPT: want_interface_events pid %d enable %d ",
1605  ntohl (mp->pid), ntohl (mp->enable_disable));
1606 
1607  FINISH;
1608 }
1609 
1610 static void *vl_api_cli_request_t_print
1611  (vl_api_cli_request_t * mp, void *handle)
1612 {
1613  u8 *s;
1614 
1615  s = format (0, "SCRIPT: cli_request ");
1616 
1617  FINISH;
1618 }
1619 
1620 static void *vl_api_cli_inband_t_print
1621  (vl_api_cli_inband_t * mp, void *handle)
1622 {
1623  u8 *s;
1624 
1625  s = format (0, "SCRIPT: cli_inband ");
1626 
1627  FINISH;
1628 }
1629 
1630 static void *vl_api_memclnt_create_t_print
1631  (vl_api_memclnt_create_t * mp, void *handle)
1632 {
1633  u8 *s;
1634 
1635  s = format (0, "SCRIPT: memclnt_create name %s ", mp->name);
1636 
1637  FINISH;
1638 }
1639 
1640 static void *vl_api_show_version_t_print
1641  (vl_api_show_version_t * mp, void *handle)
1642 {
1643  u8 *s;
1644 
1645  s = format (0, "SCRIPT: show_version ");
1646 
1647  FINISH;
1648 }
1649 
1652 {
1653  u8 *s;
1654 
1655  s = format (0, "SCRIPT: vxlan_gpe_add_del_tunnel ");
1656 
1657  s = format (s, "local %U ", format_ip46_address, &mp->local, mp->is_ipv6);
1658 
1659  s = format (s, "remote %U ", format_ip46_address, &mp->remote, mp->is_ipv6);
1660 
1661  s = format (s, "protocol %d ", ntohl (mp->protocol));
1662 
1663  s = format (s, "vni %d ", ntohl (mp->vni));
1664 
1665  if (mp->is_add == 0)
1666  s = format (s, "del ");
1667 
1668  if (mp->encap_vrf_id)
1669  s = format (s, "encap-vrf-id %d ", ntohl (mp->encap_vrf_id));
1670 
1671  if (mp->decap_vrf_id)
1672  s = format (s, "decap-vrf-id %d ", ntohl (mp->decap_vrf_id));
1673 
1674  FINISH;
1675 }
1676 
1678  (vl_api_vxlan_gpe_tunnel_dump_t * mp, void *handle)
1679 {
1680  u8 *s;
1681 
1682  s = format (0, "SCRIPT: vxlan_gpe_tunnel_dump ");
1683 
1684  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1685 
1686  FINISH;
1687 }
1688 
1691 {
1692  u8 *s;
1693 
1694  s = format (0, "SCRIPT: interface_renumber ");
1695 
1696  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1697 
1698  s = format (s, "new_show_dev_instance %d ",
1699  ntohl (mp->new_show_dev_instance));
1700 
1701  FINISH;
1702 }
1703 
1705  (vl_api_want_ip4_arp_events_t * mp, void *handle)
1706 {
1707  u8 *s;
1708 
1709  s = format (0, "SCRIPT: want_ip4_arp_events ");
1710  s = format (s, "pid %d address %U ", mp->pid,
1711  format_ip4_address, &mp->address);
1712  if (mp->enable_disable == 0)
1713  s = format (s, "del ");
1714 
1715  FINISH;
1716 }
1717 
1719  (vl_api_want_ip6_nd_events_t * mp, void *handle)
1720 {
1721  u8 *s;
1722 
1723  s = format (0, "SCRIPT: want_ip6_nd_events ");
1724  s = format (s, "pid %d address %U ", mp->pid,
1726  if (mp->enable_disable == 0)
1727  s = format (s, "del ");
1728 
1729  FINISH;
1730 }
1731 
1734 {
1735  u8 *s;
1736 
1737  s = format (0, "SCRIPT: input_acl_set_interface ");
1738 
1739  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1740  s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index));
1741  s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index));
1742  s = format (s, "l2-table %d ", ntohl (mp->l2_table_index));
1743 
1744  if (mp->is_add == 0)
1745  s = format (s, "del ");
1746 
1747  FINISH;
1748 }
1749 
1750 static void *vl_api_ip_address_dump_t_print
1751  (vl_api_ip_address_dump_t * mp, void *handle)
1752 {
1753  u8 *s;
1754 
1755  s = format (0, "SCRIPT: ip6_address_dump ");
1756  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1757  s = format (s, "is_ipv6 %d ", mp->is_ipv6 != 0);
1758 
1759  FINISH;
1760 }
1761 
1762 static void *
1764 {
1765  u8 *s;
1766 
1767  s = format (0, "SCRIPT: ip_dump ");
1768  s = format (s, "is_ipv6 %d ", mp->is_ipv6 != 0);
1769 
1770  FINISH;
1771 }
1772 
1775 {
1776  u8 *s;
1777 
1778  s = format (0, "SCRIPT: cop_interface_enable_disable ");
1779  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1780  if (mp->enable_disable)
1781  s = format (s, "enable ");
1782  else
1783  s = format (s, "disable ");
1784 
1785  FINISH;
1786 }
1787 
1790 {
1791  u8 *s;
1792 
1793  s = format (0, "SCRIPT: cop_whitelist_enable_disable ");
1794  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1795  s = format (s, "fib-id %d ", ntohl (mp->fib_id));
1796  if (mp->ip4)
1797  s = format (s, "ip4 ");
1798  if (mp->ip6)
1799  s = format (s, "ip6 ");
1800  if (mp->default_cop)
1801  s = format (s, "default ");
1802 
1803  FINISH;
1804 }
1805 
1807  (vl_api_af_packet_create_t * mp, void *handle)
1808 {
1809  u8 *s;
1810 
1811  s = format (0, "SCRIPT: af_packet_create ");
1812  s = format (s, "host_if_name %s ", mp->host_if_name);
1813  if (mp->use_random_hw_addr)
1814  s = format (s, "hw_addr random ");
1815  else
1816  s = format (s, "hw_addr %U ", format_ethernet_address, mp->hw_addr);
1817 
1818  FINISH;
1819 }
1820 
1822  (vl_api_af_packet_delete_t * mp, void *handle)
1823 {
1824  u8 *s;
1825 
1826  s = format (0, "SCRIPT: af_packet_delete ");
1827  s = format (s, "host_if_name %s ", mp->host_if_name);
1828 
1829  FINISH;
1830 }
1831 
1832 static u8 *
1833 format_policer_action (u8 * s, va_list * va)
1834 {
1835  u32 action = va_arg (*va, u32);
1836  u32 dscp = va_arg (*va, u32);
1837  char *t = 0;
1838 
1839  if (action == SSE2_QOS_ACTION_DROP)
1840  s = format (s, "drop");
1841  else if (action == SSE2_QOS_ACTION_TRANSMIT)
1842  s = format (s, "transmit");
1843  else if (action == SSE2_QOS_ACTION_MARK_AND_TRANSMIT)
1844  {
1845  s = format (s, "mark-and-transmit ");
1846  switch (dscp)
1847  {
1848 #define _(v,f,str) case VNET_DSCP_##f: t = str; break;
1850 #undef _
1851  default:
1852  break;
1853  }
1854  s = format (s, "%s", t);
1855  }
1856 
1857  return s;
1858 }
1859 
1860 static void *vl_api_policer_add_del_t_print
1861  (vl_api_policer_add_del_t * mp, void *handle)
1862 {
1863  u8 *s;
1864 
1865  s = format (0, "SCRIPT: policer_add_del ");
1866  s = format (s, "name %s ", mp->name);
1867  s = format (s, "cir %d ", mp->cir);
1868  s = format (s, "eir %d ", mp->eir);
1869  s = format (s, "cb %d ", mp->cb);
1870  s = format (s, "eb %d ", mp->eb);
1871 
1872  switch (mp->rate_type)
1873  {
1874  case SSE2_QOS_RATE_KBPS:
1875  s = format (s, "rate_type kbps ");
1876  break;
1877  case SSE2_QOS_RATE_PPS:
1878  s = format (s, "rate_type pps ");
1879  break;
1880  default:
1881  break;
1882  }
1883 
1884  switch (mp->round_type)
1885  {
1887  s = format (s, "round_type closest ");
1888  break;
1889  case SSE2_QOS_ROUND_TO_UP:
1890  s = format (s, "round_type up ");
1891  break;
1893  s = format (s, "round_type down ");
1894  break;
1895  default:
1896  break;
1897  }
1898 
1899  switch (mp->type)
1900  {
1902  s = format (s, "type 1r2c ");
1903  break;
1905  s = format (s, "type 1r3c ");
1906  break;
1908  s = format (s, "type 2r3c-2698 ");
1909  break;
1911  s = format (s, "type 2r3c-4115 ");
1912  break;
1914  s = format (s, "type 2r3c-mef5cf1 ");
1915  break;
1916  default:
1917  break;
1918  }
1919 
1920  s = format (s, "conform_action %U ", format_policer_action,
1922  s = format (s, "exceed_action %U ", format_policer_action,
1923  mp->exceed_action_type, mp->exceed_dscp);
1924  s = format (s, "violate_action %U ", format_policer_action,
1926 
1927  if (mp->color_aware)
1928  s = format (s, "color-aware ");
1929  if (mp->is_add == 0)
1930  s = format (s, "del ");
1931 
1932  FINISH;
1933 }
1934 
1935 static void *vl_api_policer_dump_t_print
1936  (vl_api_policer_dump_t * mp, void *handle)
1937 {
1938  u8 *s;
1939 
1940  s = format (0, "SCRIPT: policer_dump ");
1941  if (mp->match_name_valid)
1942  s = format (s, "name %s ", mp->match_name);
1943 
1944  FINISH;
1945 }
1946 
1949 {
1950  u8 *s;
1951 
1952  s = format (0, "SCRIPT: policer_classify_set_interface ");
1953  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1954  if (mp->ip4_table_index != ~0)
1955  s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index));
1956  if (mp->ip6_table_index != ~0)
1957  s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index));
1958  if (mp->l2_table_index != ~0)
1959  s = format (s, "l2-table %d ", ntohl (mp->l2_table_index));
1960  if (mp->is_add == 0)
1961  s = format (s, "del ");
1962 
1963  FINISH;
1964 }
1965 
1967  (vl_api_policer_classify_dump_t * mp, void *handle)
1968 {
1969  u8 *s;
1970 
1971  s = format (0, "SCRIPT: policer_classify_dump ");
1972  switch (mp->type)
1973  {
1975  s = format (s, "type ip4 ");
1976  break;
1978  s = format (s, "type ip6 ");
1979  break;
1981  s = format (s, "type l2 ");
1982  break;
1983  default:
1984  break;
1985  }
1986 
1987  FINISH;
1988 }
1989 
1992 {
1993  u8 *s;
1994 
1995  s = format (0, "SCRIPT: sw_interface_clear_stats ");
1996  if (mp->sw_if_index != ~0)
1997  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
1998 
1999  FINISH;
2000 }
2001 
2003  (vl_api_mpls_tunnel_dump_t * mp, void *handle)
2004 {
2005  u8 *s;
2006 
2007  s = format (0, "SCRIPT: mpls_tunnel_dump ");
2008 
2009  s = format (s, "tunnel_index %d ", ntohl (mp->tunnel_index));
2010 
2011  FINISH;
2012 }
2013 
2014 static void *vl_api_mpls_fib_dump_t_print
2015  (vl_api_mpls_fib_dump_t * mp, void *handle)
2016 {
2017  u8 *s;
2018 
2019  s = format (0, "SCRIPT: mpls_fib_decap_dump ");
2020 
2021  FINISH;
2022 }
2023 
2024 static void *vl_api_ip_fib_dump_t_print
2025  (vl_api_ip_fib_dump_t * mp, void *handle)
2026 {
2027  u8 *s;
2028 
2029  s = format (0, "SCRIPT: ip_fib_dump ");
2030 
2031  FINISH;
2032 }
2033 
2034 static void *vl_api_ip6_fib_dump_t_print
2035  (vl_api_ip6_fib_dump_t * mp, void *handle)
2036 {
2037  u8 *s;
2038 
2039  s = format (0, "SCRIPT: ip6_fib_dump ");
2040 
2041  FINISH;
2042 }
2043 
2045  (vl_api_classify_table_ids_t * mp, void *handle)
2046 {
2047  u8 *s;
2048 
2049  s = format (0, "SCRIPT: classify_table_ids ");
2050 
2051  FINISH;
2052 }
2053 
2056 {
2057  u8 *s;
2058 
2059  s = format (0, "SCRIPT: classify_table_by_interface ");
2060  if (mp->sw_if_index != ~0)
2061  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2062 
2063  FINISH;
2064 }
2065 
2067  (vl_api_classify_table_info_t * mp, void *handle)
2068 {
2069  u8 *s;
2070 
2071  s = format (0, "SCRIPT: classify_table_info ");
2072  if (mp->table_id != ~0)
2073  s = format (s, "table_id %d ", ntohl (mp->table_id));
2074 
2075  FINISH;
2076 }
2077 
2079  (vl_api_classify_session_dump_t * mp, void *handle)
2080 {
2081  u8 *s;
2082 
2083  s = format (0, "SCRIPT: classify_session_dump ");
2084  if (mp->table_id != ~0)
2085  s = format (s, "table_id %d ", ntohl (mp->table_id));
2086 
2087  FINISH;
2088 }
2089 
2091  (vl_api_set_ipfix_exporter_t * mp, void *handle)
2092 {
2093  u8 *s;
2094 
2095  s = format (0, "SCRIPT: set_ipfix_exporter ");
2096 
2097  s = format (s, "collector-address %U ", format_ip4_address,
2099  s = format (s, "collector-port %d ", ntohs (mp->collector_port));
2100  s = format (s, "src-address %U ", format_ip4_address,
2101  (ip4_address_t *) mp->src_address);
2102  s = format (s, "vrf-id %d ", ntohl (mp->vrf_id));
2103  s = format (s, "path-mtu %d ", ntohl (mp->path_mtu));
2104  s = format (s, "template-interval %d ", ntohl (mp->template_interval));
2105  s = format (s, "udp-checksum %d ", mp->udp_checksum);
2106 
2107  FINISH;
2108 }
2109 
2111  (vl_api_ipfix_exporter_dump_t * mp, void *handle)
2112 {
2113  u8 *s;
2114 
2115  s = format (0, "SCRIPT: ipfix_exporter_dump ");
2116 
2117  FINISH;
2118 }
2119 
2122 {
2123  u8 *s;
2124 
2125  s = format (0, "SCRIPT: set_ipfix_classify_stream ");
2126 
2127  s = format (s, "domain-id %d ", ntohl (mp->domain_id));
2128  s = format (s, "src-port %d ", ntohs (mp->src_port));
2129 
2130  FINISH;
2131 }
2132 
2135 {
2136  u8 *s;
2137 
2138  s = format (0, "SCRIPT: ipfix_classify_stream_dump ");
2139 
2140  FINISH;
2141 }
2142 
2145 {
2146  u8 *s;
2147 
2148  s = format (0, "SCRIPT: ipfix_classify_table_add_del ");
2149 
2150  s = format (s, "table-id %d ", ntohl (mp->table_id));
2151  s = format (s, "ip-version %d ", mp->ip_version);
2152  s = format (s, "transport-protocol %d ", mp->transport_protocol);
2153 
2154  FINISH;
2155 }
2156 
2159 {
2160  u8 *s;
2161 
2162  s = format (0, "SCRIPT: ipfix_classify_table_dump ");
2163 
2164  FINISH;
2165 }
2166 
2169 {
2170  u8 *s;
2171 
2172  s = format (0, "SCRIPT: sw_interface_span_enable_disable ");
2173  s = format (s, "src_sw_if_index %u ", ntohl (mp->sw_if_index_from));
2174  s = format (s, "dst_sw_if_index %u ", ntohl (mp->sw_if_index_to));
2175 
2176  switch (mp->state)
2177  {
2178  case 0:
2179  s = format (s, "disable ");
2180  break;
2181  case 1:
2182  s = format (s, "rx ");
2183  break;
2184  case 2:
2185  s = format (s, "tx ");
2186  break;
2187  case 3:
2188  default:
2189  s = format (s, "both ");
2190  break;
2191  }
2192 
2193  FINISH;
2194 }
2195 
2196 static void *
2198  void *handle)
2199 {
2200  u8 *s;
2201 
2202  s = format (0, "SCRIPT: sw_interface_span_dump ");
2203 
2204  FINISH;
2205 }
2206 
2207 static void *vl_api_get_next_index_t_print
2208  (vl_api_get_next_index_t * mp, void *handle)
2209 {
2210  u8 *s;
2211 
2212  s = format (0, "SCRIPT: get_next_index ");
2213  s = format (s, "node-name %s ", mp->node_name);
2214  s = format (s, "next-node-name %s ", mp->next_name);
2215 
2216  FINISH;
2217 }
2218 
2220  (vl_api_pg_create_interface_t * mp, void *handle)
2221 {
2222  u8 *s;
2223 
2224  s = format (0, "SCRIPT: pg_create_interface ");
2225  s = format (0, "if_id %d", ntohl (mp->interface_id));
2226 
2227  FINISH;
2228 }
2229 
2230 static void *vl_api_pg_capture_t_print
2231  (vl_api_pg_capture_t * mp, void *handle)
2232 {
2233  u8 *s;
2234 
2235  s = format (0, "SCRIPT: pg_capture ");
2236  s = format (0, "if_id %d ", ntohl (mp->interface_id));
2237  s = format (0, "pcap %s", mp->pcap_file_name);
2238  if (mp->count != ~0)
2239  s = format (s, "count %d ", ntohl (mp->count));
2240  if (!mp->is_enabled)
2241  s = format (s, "disable");
2242 
2243  FINISH;
2244 }
2245 
2247  (vl_api_pg_enable_disable_t * mp, void *handle)
2248 {
2249  u8 *s;
2250 
2251  s = format (0, "SCRIPT: pg_enable_disable ");
2252  if (ntohl (mp->stream_name_length) > 0)
2253  s = format (s, "stream %s", mp->stream_name);
2254  if (!mp->is_enabled)
2255  s = format (s, "disable");
2256 
2257  FINISH;
2258 }
2259 
2262 {
2263  u8 *s;
2264  int i;
2265 
2266  s = format (0, "SCRIPT: ip_source_and_port_range_check_add_del ");
2267  if (mp->is_ipv6)
2268  s = format (s, "%U/%d ", format_ip6_address, mp->address,
2269  mp->mask_length);
2270  else
2271  s = format (s, "%U/%d ", format_ip4_address, mp->address,
2272  mp->mask_length);
2273 
2274  for (i = 0; i < mp->number_of_ranges; i++)
2275  {
2276  s = format (s, "range %d - %d ", mp->low_ports[i], mp->high_ports[i]);
2277  }
2278 
2279  s = format (s, "vrf %d ", ntohl (mp->vrf_id));
2280 
2281  if (mp->is_add == 0)
2282  s = format (s, "del ");
2283 
2284  FINISH;
2285 }
2286 
2289  void *handle)
2290 {
2291  u8 *s;
2292 
2293  s = format (0, "SCRIPT: ip_source_and_port_range_check_interface_add_del ");
2294 
2295  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2296 
2297  if (mp->tcp_out_vrf_id != ~0)
2298  s = format (s, "tcp-out-vrf %d ", ntohl (mp->tcp_out_vrf_id));
2299 
2300  if (mp->udp_out_vrf_id != ~0)
2301  s = format (s, "udp-out-vrf %d ", ntohl (mp->udp_out_vrf_id));
2302 
2303  if (mp->tcp_in_vrf_id != ~0)
2304  s = format (s, "tcp-in-vrf %d ", ntohl (mp->tcp_in_vrf_id));
2305 
2306  if (mp->udp_in_vrf_id != ~0)
2307  s = format (s, "udp-in-vrf %d ", ntohl (mp->udp_in_vrf_id));
2308 
2309  if (mp->is_add == 0)
2310  s = format (s, "del ");
2311 
2312  FINISH;
2313 }
2314 
2316  (vl_api_lisp_enable_disable_t * mp, void *handle)
2317 {
2318  u8 *s;
2319 
2320  s = format (0, "SCRIPT: lisp_enable_disable %s",
2321  mp->is_en ? "enable" : "disable");
2322 
2323  FINISH;
2324 }
2325 
2327  (vl_api_lisp_gpe_add_del_iface_t * mp, void *handle)
2328 {
2329  u8 *s;
2330 
2331  s = format (0, "SCRIPT: lisp_gpe_add_del_iface ");
2332 
2333  s = format (s, "%s ", mp->is_add ? "up" : "down");
2334  s = format (s, "vni %d ", mp->vni);
2335  s = format (s, "%s %d ", mp->is_l2 ? "bd_id" : "table_id", mp->dp_table);
2336 
2337  FINISH;
2338 }
2339 
2342 {
2343  u8 *s;
2344 
2345  s = format (0, "SCRIPT: lisp_pitr_set_locator_set ");
2346 
2347  if (mp->is_add)
2348  s = format (s, "locator-set %s ", mp->ls_name);
2349  else
2350  s = format (s, "del");
2351 
2352  FINISH;
2353 }
2354 
2355 static u8 *
2356 format_lisp_flat_eid (u8 * s, va_list * args)
2357 {
2358  u32 type = va_arg (*args, u32);
2359  u8 *eid = va_arg (*args, u8 *);
2360  u32 eid_len = va_arg (*args, u32);
2361 
2362  switch (type)
2363  {
2364  case 0:
2365  return format (s, "%U/%d", format_ip4_address, eid, eid_len);
2366  case 1:
2367  return format (s, "%U/%d", format_ip6_address, eid, eid_len);
2368  case 3:
2369  return format (s, "%U", format_ethernet_address, eid);
2370  }
2371  return 0;
2372 }
2373 
2374 /** Used for transferring locators via VPP API */
2375 typedef CLIB_PACKED (struct
2376  {
2377  u8 is_ip4;
2378  /**< is locator an IPv4 address */
2379  u8 priority;
2380  /**< locator priority */
2381  u8 weight;
2382  /**< locator weight */
2383  u8 addr[16];
2384  /**< IPv4/IPv6 address */
2385  }) rloc_t;
2386 
2387 static u8 *
2388 format_rloc (u8 * s, va_list * args)
2389 {
2390  rloc_t *rloc = va_arg (*args, rloc_t *);
2391 
2392  if (rloc->is_ip4)
2393  s = format (s, "%U ", format_ip4_address, rloc->addr);
2394  else
2395  s = format (s, "%U ", format_ip6_address, rloc->addr);
2396 
2397  s = format (s, "p %d w %d", rloc->priority, rloc->weight);
2398 
2399  return s;
2400 }
2401 
2404 {
2405  u8 *s;
2406  u32 i, rloc_num = 0;
2407 
2408  s = format (0, "SCRIPT: lisp_add_del_remote_mapping ");
2409 
2410  if (mp->del_all)
2411  s = format (s, "del-all ");
2412 
2413  s = format (s, "%s ", mp->is_add ? "add" : "del");
2414  s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni));
2415 
2416  s = format (s, "eid %U ", format_lisp_flat_eid,
2417  mp->eid_type, mp->eid, mp->eid_len);
2418 
2419  if (mp->is_src_dst)
2420  {
2421  s = format (s, "seid %U ", format_lisp_flat_eid,
2422  mp->eid_type, mp->seid, mp->seid_len);
2423  }
2424 
2425  rloc_num = clib_net_to_host_u32 (mp->rloc_num);
2426 
2427  if (0 == rloc_num)
2428  s = format (s, "action %d", mp->action);
2429  else
2430  {
2431  rloc_t *rloc = (rloc_t *) mp->rlocs;
2432  for (i = 0; i < rloc_num; i++)
2433  s = format (s, "%U ", format_rloc, &rloc[i]);
2434  }
2435 
2436  FINISH;
2437 }
2438 
2440  (vl_api_lisp_add_del_adjacency_t * mp, void *handle)
2441 {
2442  u8 *s;
2443 
2444  s = format (0, "SCRIPT: lisp_add_del_adjacency ");
2445 
2446  s = format (s, "%s ", mp->is_add ? "add" : "del");
2447  s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni));
2448  s = format (s, "reid %U leid %U ",
2449  format_lisp_flat_eid, mp->eid_type, mp->reid, mp->reid_len,
2450  format_lisp_flat_eid, mp->eid_type, mp->leid, mp->leid_len);
2451 
2452  FINISH;
2453 }
2454 
2457 {
2458  u8 *s;
2459 
2460  s = format (0, "SCRIPT: lisp_add_del_map_request_itr_rlocs ");
2461 
2462  if (mp->is_add)
2463  s = format (s, "%s", mp->locator_set_name);
2464  else
2465  s = format (s, "del");
2466 
2467  FINISH;
2468 }
2469 
2472 {
2473  u8 *s;
2474 
2475  s = format (0, "SCRIPT: lisp_eid_table_add_del_map ");
2476 
2477  if (!mp->is_add)
2478  s = format (s, "del ");
2479 
2480  s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni));
2481  s = format (s, "%s %d ",
2482  mp->is_l2 ? "bd_index" : "vrf",
2483  clib_net_to_host_u32 (mp->dp_table));
2484  FINISH;
2485 }
2486 
2488  (vl_api_lisp_add_del_local_eid_t * mp, void *handle)
2489 {
2490  u8 *s;
2491 
2492  s = format (0, "SCRIPT: lisp_add_del_local_eid ");
2493 
2494  if (!mp->is_add)
2495  s = format (s, "del ");
2496 
2497  s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni));
2498  s = format (s, "eid %U ", format_lisp_flat_eid, mp->eid_type, mp->eid,
2499  mp->prefix_len);
2500  s = format (s, "locator-set %s ", mp->locator_set_name);
2501  if (*mp->key)
2502  {
2503  u32 key_id = mp->key_id;
2504  s = format (s, "key-id %U", format_hmac_key_id, key_id);
2505  s = format (s, "secret-key %s", mp->key);
2506  }
2507  FINISH;
2508 }
2509 
2512 {
2513  u8 *s;
2514 
2515  s = format (0, "SCRIPT: lisp_gpe_add_del_fwd_entry TODO");
2516 
2517  FINISH;
2518 }
2519 
2522 {
2523  u8 *s;
2524 
2525  s = format (0, "SCRIPT: lisp_add_del_map_resolver ");
2526 
2527  if (!mp->is_add)
2528  s = format (s, "del ");
2529 
2530  if (mp->is_ipv6)
2531  s = format (s, "%U ", format_ip6_address, mp->ip_address);
2532  else
2533  s = format (s, "%U ", format_ip4_address, mp->ip_address);
2534 
2535  FINISH;
2536 }
2537 
2540 {
2541  u8 *s;
2542 
2543  s = format (0, "SCRIPT: lisp_gpe_enable_disable ");
2544 
2545  s = format (s, "%s ", mp->is_en ? "enable" : "disable");
2546 
2547  FINISH;
2548 }
2549 
2550 typedef CLIB_PACKED (struct
2551  {
2552  u32 sw_if_index;
2553  /**< locator sw_if_index */
2554  u8 priority;
2555  /**< locator priority */
2556  u8 weight;
2557  /**< locator weight */
2558  }) ls_locator_t;
2559 
2560 static u8 *
2561 format_locator (u8 * s, va_list * args)
2562 {
2563  ls_locator_t *l = va_arg (*args, ls_locator_t *);
2564 
2565  return format (s, "sw_if_index %d p %d w %d",
2566  l->sw_if_index, l->priority, l->weight);
2567 }
2568 
2571 {
2572  u8 *s;
2573  u32 loc_num = 0, i;
2574  ls_locator_t *locs;
2575 
2576  s = format (0, "SCRIPT: lisp_add_del_locator_set ");
2577 
2578  if (!mp->is_add)
2579  s = format (s, "del ");
2580 
2581  s = format (s, "locator-set %s ", mp->locator_set_name);
2582 
2583  loc_num = clib_net_to_host_u32 (mp->locator_num);
2584  locs = (ls_locator_t *) mp->locators;
2585 
2586  for (i = 0; i < loc_num; i++)
2587  s = format (s, "%U ", format_locator, &locs[i]);
2588 
2589  FINISH;
2590 }
2591 
2593  (vl_api_lisp_add_del_locator_t * mp, void *handle)
2594 {
2595  u8 *s;
2596 
2597  s = format (0, "SCRIPT: lisp_add_del_locator ");
2598 
2599  if (!mp->is_add)
2600  s = format (s, "del ");
2601 
2602  s = format (s, "locator-set %s ", mp->locator_set_name);
2603  s = format (s, "sw_if_index %d ", mp->sw_if_index);
2604  s = format (s, "p %d w %d ", mp->priority, mp->weight);
2605 
2606  FINISH;
2607 }
2608 
2610  (vl_api_lisp_locator_set_dump_t * mp, void *handle)
2611 {
2612  u8 *s;
2613 
2614  s = format (0, "SCRIPT: lisp_locator_set_dump ");
2615  if (mp->filter == 1)
2616  s = format (s, "local");
2617  else if (mp->filter == 2)
2618  s = format (s, "remote");
2619 
2620  FINISH;
2621 }
2622 
2624  (vl_api_lisp_locator_dump_t * mp, void *handle)
2625 {
2626  u8 *s;
2627 
2628  s = format (0, "SCRIPT: lisp_locator_dump ");
2629  if (mp->is_index_set)
2630  s = format (s, "ls_index %d", clib_net_to_host_u32 (mp->ls_index));
2631  else
2632  s = format (s, "ls_name %s", mp->ls_name);
2633 
2634  FINISH;
2635 }
2636 
2638  (vl_api_lisp_map_request_mode_t * mp, void *handle)
2639 {
2640  u8 *s;
2641 
2642  s = format (0, "SCRIPT: lisp_map_request_mode ");
2643 
2644  switch (mp->mode)
2645  {
2646  case 0:
2647  s = format (s, "dst-only");
2648  break;
2649  case 1:
2650  s = format (s, "src-dst");
2651  default:
2652  break;
2653  }
2654 
2655  FINISH;
2656 }
2657 
2659  (vl_api_lisp_eid_table_dump_t * mp, void *handle)
2660 {
2661  u8 *s;
2662 
2663  s = format (0, "SCRIPT: lisp_eid_table_dump ");
2664 
2665  if (mp->eid_set)
2666  {
2667  s = format (s, "vni %d ", clib_net_to_host_u32 (mp->vni));
2668  s = format (s, "eid %U ", format_lisp_flat_eid, mp->eid_type,
2669  mp->eid, mp->prefix_length);
2670  switch (mp->filter)
2671  {
2672  case 1:
2673  s = format (s, "local ");
2674  break;
2675  case 2:
2676  s = format (s, "remote ");
2677  break;
2678  }
2679  }
2680 
2681  FINISH;
2682 }
2683 
2686 {
2687  u8 *s;
2688 
2689  s = format (0, "SCRIPT: lisp_rloc_probe_enable_disable ");
2690  if (mp->is_enabled)
2691  s = format (s, "enable");
2692  else
2693  s = format (s, "disable");
2694 
2695  FINISH;
2696 }
2697 
2700 {
2701  u8 *s;
2702 
2703  s = format (0, "SCRIPT: lisp_map_register_enable_disable ");
2704  if (mp->is_enabled)
2705  s = format (s, "enable");
2706  else
2707  s = format (s, "disable");
2708 
2709  FINISH;
2710 }
2711 
2713  (vl_api_lisp_adjacencies_get_t * mp, void *handle)
2714 {
2715  u8 *s;
2716 
2717  s = format (0, "SCRIPT: lisp_adjacencies_get ");
2718  s = format (s, "vni %d", clib_net_to_host_u32 (mp->vni));
2719 
2720  FINISH;
2721 }
2722 
2725 {
2726  u8 *s;
2727 
2728  s = format (0, "SCRIPT: lisp_eid_table_map_dump ");
2729 
2730  if (mp->is_l2)
2731  s = format (s, "l2");
2732  else
2733  s = format (s, "l3");
2734 
2735  FINISH;
2736 }
2737 
2740 {
2741  u8 *s;
2742 
2743  s = format (0, "SCRIPT: ipsec_gre_add_del_tunnel ");
2744 
2745  s = format (s, "dst %U ", format_ip4_address,
2746  (ip4_address_t *) & (mp->dst_address));
2747 
2748  s = format (s, "src %U ", format_ip4_address,
2749  (ip4_address_t *) & (mp->src_address));
2750 
2751  s = format (s, "local_sa %d ", ntohl (mp->local_sa_id));
2752 
2753  s = format (s, "remote_sa %d ", ntohl (mp->remote_sa_id));
2754 
2755  if (mp->is_add == 0)
2756  s = format (s, "del ");
2757 
2758  FINISH;
2759 }
2760 
2762  (vl_api_ipsec_gre_tunnel_dump_t * mp, void *handle)
2763 {
2764  u8 *s;
2765 
2766  s = format (0, "SCRIPT: ipsec_gre_tunnel_dump ");
2767 
2768  if (mp->sw_if_index != ~0)
2769  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2770 
2771  FINISH;
2772 }
2773 
2776 {
2777  u8 *s;
2778  u32 vtr_op = ntohl (mp->vtr_op);
2779 
2780  s = format (0, "SCRIPT: l2_interface_pbb_tag_rewrite ");
2781 
2782  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2783  s = format (s, "vtr_op %d ", vtr_op);
2784  if (vtr_op != L2_VTR_DISABLED && vtr_op != L2_VTR_POP_2)
2785  {
2786  if (vtr_op == L2_VTR_TRANSLATE_2_2)
2787  s = format (s, "%d ", ntohs (mp->outer_tag));
2788  s = format (s, "dmac %U ", format_ethernet_address, &mp->b_dmac);
2789  s = format (s, "smac %U ", format_ethernet_address, &mp->b_smac);
2790  s = format (s, "sid %d ", ntohl (mp->i_sid));
2791  s = format (s, "vlanid %d ", ntohs (mp->b_vlanid));
2792  }
2793 
2794  FINISH;
2795 }
2796 
2799 {
2800  u8 *s;
2801 
2802  s = format (0, "SCRIPT: flow_classify_set_interface ");
2803  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2804  if (mp->ip4_table_index != ~0)
2805  s = format (s, "ip4-table %d ", ntohl (mp->ip4_table_index));
2806  if (mp->ip6_table_index != ~0)
2807  s = format (s, "ip6-table %d ", ntohl (mp->ip6_table_index));
2808  if (mp->is_add == 0)
2809  s = format (s, "del ");
2810 
2811  FINISH;
2812 }
2813 
2814 static void *
2816 {
2817  u8 *s;
2818 
2819  s = format (0, "SCRIPT: punt ");
2820 
2821  if (mp->ipv != (u8) ~ 0)
2822  s = format (s, "ip %d ", mp->ipv);
2823 
2824  s = format (s, "protocol %d ", mp->l4_protocol);
2825 
2826  if (mp->l4_port != (u16) ~ 0)
2827  s = format (s, "port %d ", ntohs (mp->l4_port));
2828 
2829  if (!mp->is_add)
2830  s = format (s, "del ");
2831 
2832  FINISH;
2833 }
2834 
2836  (vl_api_flow_classify_dump_t * mp, void *handle)
2837 {
2838  u8 *s;
2839 
2840  s = format (0, "SCRIPT: flow_classify_dump ");
2841  switch (mp->type)
2842  {
2844  s = format (s, "type ip4 ");
2845  break;
2847  s = format (s, "type ip6 ");
2848  break;
2849  default:
2850  break;
2851  }
2852 
2853  FINISH;
2854 }
2855 
2857  (vl_api_get_first_msg_id_t * mp, void *handle)
2858 {
2859  u8 *s;
2860 
2861  s = format (0, "SCRIPT: get_first_msg_id %s ", mp->name);
2862 
2863  FINISH;
2864 }
2865 
2866 static void *vl_api_ioam_enable_t_print
2867  (vl_api_ioam_enable_t * mp, void *handle)
2868 {
2869  u8 *s;
2870 
2871  s = format (0, "SCRIPT: ioam_enable ");
2872 
2873  if (mp->trace_enable)
2874  s = format (s, "trace enabled");
2875 
2876  if (mp->pot_enable)
2877  s = format (s, "POT enabled");
2878 
2879  if (mp->seqno)
2880  s = format (s, "Seqno enabled");
2881 
2882  if (mp->analyse)
2883  s = format (s, "Analyse enabled");
2884 
2885  FINISH;
2886 }
2887 
2888 static void *vl_api_ioam_disable_t_print
2889  (vl_api_ioam_disable_t * mp, void *handle)
2890 {
2891  u8 *s;
2892 
2893  s = format (0, "SCRIPT: ioam_disable ");
2894  s = format (s, "trace disabled");
2895  s = format (s, "POT disabled");
2896  s = format (s, "Seqno disabled");
2897  s = format (s, "Analyse disabled");
2898 
2899  FINISH;
2900 }
2901 
2903  (vl_api_feature_enable_disable_t * mp, void *handle)
2904 {
2905  u8 *s;
2906 
2907  s = format (0, "SCRIPT: feature_enable_disable ");
2908  s = format (s, "arc_name %s ", mp->arc_name);
2909  s = format (s, "feature_name %s ", mp->feature_name);
2910  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2911  if (!mp->enable)
2912  s = format (s, "disable");
2913 
2914  FINISH;
2915 }
2916 
2919 {
2920  u8 *s;
2921 
2922  s = format (0, "SCRIPT: sw_interface_tag_add_del ");
2923  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2924  if (mp->is_add)
2925  s = format (s, "tag %s ", mp->tag);
2926  else
2927  s = format (s, "del ");
2928 
2929  FINISH;
2930 }
2931 
2933  (vl_api_sw_interface_set_mtu_t * mp, void *handle)
2934 {
2935  u8 *s;
2936 
2937  s = format (0, "SCRIPT: sw_interface_set_mtu ");
2938  s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
2939  s = format (s, "tag %d ", ntohs (mp->mtu));
2940 
2941  FINISH;
2942 }
2943 
2944 #define foreach_custom_print_no_arg_function \
2945 _(lisp_eid_table_vni_dump) \
2946 _(lisp_map_resolver_dump) \
2947 _(lisp_map_server_dump) \
2948 _(show_lisp_rloc_probe_state) \
2949 _(show_lisp_map_register_state) \
2950 _(show_lisp_map_request_mode) \
2951 _(lisp_gpe_tunnel_dump)
2952 
2953 #define _(f) \
2954 static void * vl_api_ ## f ## _t_print \
2955  (vl_api_ ## f ## _t * mp, void * handle) \
2956 { \
2957  u8 * s; \
2958  s = format (0, "SCRIPT: " #f ); \
2959  FINISH; \
2960 }
2962 #undef _
2963 #define foreach_custom_print_function \
2964 _(CREATE_LOOPBACK, create_loopback) \
2965 _(SW_INTERFACE_SET_FLAGS, sw_interface_set_flags) \
2966 _(SW_INTERFACE_ADD_DEL_ADDRESS, sw_interface_add_del_address) \
2967 _(SW_INTERFACE_SET_TABLE, sw_interface_set_table) \
2968 _(SW_INTERFACE_SET_MPLS_ENABLE, sw_interface_set_mpls_enable) \
2969 _(SW_INTERFACE_SET_VPATH, sw_interface_set_vpath) \
2970 _(SW_INTERFACE_SET_VXLAN_BYPASS, sw_interface_set_vxlan_bypass) \
2971 _(TAP_CONNECT, tap_connect) \
2972 _(TAP_MODIFY, tap_modify) \
2973 _(TAP_DELETE, tap_delete) \
2974 _(SW_INTERFACE_TAP_DUMP, sw_interface_tap_dump) \
2975 _(IP_ADD_DEL_ROUTE, ip_add_del_route) \
2976 _(PROXY_ARP_ADD_DEL, proxy_arp_add_del) \
2977 _(PROXY_ARP_INTFC_ENABLE_DISABLE, proxy_arp_intfc_enable_disable) \
2978 _(MPLS_TUNNEL_ADD_DEL, mpls_tunnel_add_del) \
2979 _(SW_INTERFACE_SET_UNNUMBERED, sw_interface_set_unnumbered) \
2980 _(IP_NEIGHBOR_ADD_DEL, ip_neighbor_add_del) \
2981 _(RESET_VRF, reset_vrf) \
2982 _(CREATE_VLAN_SUBIF, create_vlan_subif) \
2983 _(CREATE_SUBIF, create_subif) \
2984 _(OAM_ADD_DEL, oam_add_del) \
2985 _(RESET_FIB, reset_fib) \
2986 _(DHCP_PROXY_CONFIG, dhcp_proxy_config) \
2987 _(DHCP_PROXY_SET_VSS, dhcp_proxy_set_vss) \
2988 _(SET_IP_FLOW_HASH, set_ip_flow_hash) \
2989 _(SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS, \
2990  sw_interface_ip6_set_link_local_address) \
2991 _(SW_INTERFACE_IP6ND_RA_PREFIX, sw_interface_ip6nd_ra_prefix) \
2992 _(SW_INTERFACE_IP6ND_RA_CONFIG, sw_interface_ip6nd_ra_config) \
2993 _(SET_ARP_NEIGHBOR_LIMIT, set_arp_neighbor_limit) \
2994 _(L2_PATCH_ADD_DEL, l2_patch_add_del) \
2995 _(SR_TUNNEL_ADD_DEL, sr_tunnel_add_del) \
2996 _(SR_POLICY_ADD_DEL, sr_policy_add_del) \
2997 _(SR_MULTICAST_MAP_ADD_DEL, sr_multicast_map_add_del) \
2998 _(SW_INTERFACE_SET_L2_XCONNECT, sw_interface_set_l2_xconnect) \
2999 _(L2FIB_ADD_DEL, l2fib_add_del) \
3000 _(L2_FLAGS, l2_flags) \
3001 _(BRIDGE_FLAGS, bridge_flags) \
3002 _(CLASSIFY_ADD_DEL_TABLE, classify_add_del_table) \
3003 _(CLASSIFY_ADD_DEL_SESSION, classify_add_del_session) \
3004 _(SW_INTERFACE_SET_L2_BRIDGE, sw_interface_set_l2_bridge) \
3005 _(SW_INTERFACE_SET_DPDK_HQOS_PIPE, sw_interface_set_dpdk_hqos_pipe) \
3006 _(SW_INTERFACE_SET_DPDK_HQOS_SUBPORT, sw_interface_set_dpdk_hqos_subport)\
3007 _(SW_INTERFACE_SET_DPDK_HQOS_TCTBL, sw_interface_set_dpdk_hqos_tctbl) \
3008 _(BRIDGE_DOMAIN_ADD_DEL, bridge_domain_add_del) \
3009 _(BRIDGE_DOMAIN_DUMP, bridge_domain_dump) \
3010 _(CLASSIFY_SET_INTERFACE_IP_TABLE, classify_set_interface_ip_table) \
3011 _(CLASSIFY_SET_INTERFACE_L2_TABLES, classify_set_interface_l2_tables) \
3012 _(ADD_NODE_NEXT, add_node_next) \
3013 _(DHCP_PROXY_CONFIG_2, dhcp_proxy_config_2) \
3014 _(DHCP_CLIENT_CONFIG, dhcp_client_config) \
3015 _(L2TPV3_CREATE_TUNNEL, l2tpv3_create_tunnel) \
3016 _(L2TPV3_SET_TUNNEL_COOKIES, l2tpv3_set_tunnel_cookies) \
3017 _(L2TPV3_INTERFACE_ENABLE_DISABLE, l2tpv3_interface_enable_disable) \
3018 _(L2TPV3_SET_LOOKUP_KEY, l2tpv3_set_lookup_key) \
3019 _(SW_IF_L2TPV3_TUNNEL_DUMP, sw_if_l2tpv3_tunnel_dump) \
3020 _(VXLAN_ADD_DEL_TUNNEL, vxlan_add_del_tunnel) \
3021 _(VXLAN_TUNNEL_DUMP, vxlan_tunnel_dump) \
3022 _(GRE_ADD_DEL_TUNNEL, gre_add_del_tunnel) \
3023 _(GRE_TUNNEL_DUMP, gre_tunnel_dump) \
3024 _(L2_FIB_CLEAR_TABLE, l2_fib_clear_table) \
3025 _(L2_INTERFACE_EFP_FILTER, l2_interface_efp_filter) \
3026 _(L2_INTERFACE_VLAN_TAG_REWRITE, l2_interface_vlan_tag_rewrite) \
3027 _(CREATE_VHOST_USER_IF, create_vhost_user_if) \
3028 _(MODIFY_VHOST_USER_IF, modify_vhost_user_if) \
3029 _(DELETE_VHOST_USER_IF, delete_vhost_user_if) \
3030 _(SW_INTERFACE_DUMP, sw_interface_dump) \
3031 _(CONTROL_PING, control_ping) \
3032 _(WANT_INTERFACE_EVENTS, want_interface_events) \
3033 _(CLI_REQUEST, cli_request) \
3034 _(CLI_INBAND, cli_inband) \
3035 _(MEMCLNT_CREATE, memclnt_create) \
3036 _(SW_INTERFACE_VHOST_USER_DUMP, sw_interface_vhost_user_dump) \
3037 _(SHOW_VERSION, show_version) \
3038 _(L2_FIB_TABLE_DUMP, l2_fib_table_dump) \
3039 _(VXLAN_GPE_ADD_DEL_TUNNEL, vxlan_gpe_add_del_tunnel) \
3040 _(VXLAN_GPE_TUNNEL_DUMP, vxlan_gpe_tunnel_dump) \
3041 _(INTERFACE_NAME_RENUMBER, interface_name_renumber) \
3042 _(WANT_IP4_ARP_EVENTS, want_ip4_arp_events) \
3043 _(WANT_IP6_ND_EVENTS, want_ip6_nd_events) \
3044 _(INPUT_ACL_SET_INTERFACE, input_acl_set_interface) \
3045 _(IP_ADDRESS_DUMP, ip_address_dump) \
3046 _(IP_DUMP, ip_dump) \
3047 _(DELETE_LOOPBACK, delete_loopback) \
3048 _(BD_IP_MAC_ADD_DEL, bd_ip_mac_add_del) \
3049 _(COP_INTERFACE_ENABLE_DISABLE, cop_interface_enable_disable) \
3050 _(COP_WHITELIST_ENABLE_DISABLE, cop_whitelist_enable_disable) \
3051 _(AF_PACKET_CREATE, af_packet_create) \
3052 _(AF_PACKET_DELETE, af_packet_delete) \
3053 _(SW_INTERFACE_CLEAR_STATS, sw_interface_clear_stats) \
3054 _(MPLS_FIB_DUMP, mpls_fib_dump) \
3055 _(MPLS_TUNNEL_DUMP, mpls_tunnel_dump) \
3056 _(CLASSIFY_TABLE_IDS,classify_table_ids) \
3057 _(CLASSIFY_TABLE_BY_INTERFACE, classify_table_by_interface) \
3058 _(CLASSIFY_TABLE_INFO,classify_table_info) \
3059 _(CLASSIFY_SESSION_DUMP,classify_session_dump) \
3060 _(SET_IPFIX_EXPORTER, set_ipfix_exporter) \
3061 _(IPFIX_EXPORTER_DUMP, ipfix_exporter_dump) \
3062 _(SET_IPFIX_CLASSIFY_STREAM, set_ipfix_classify_stream) \
3063 _(IPFIX_CLASSIFY_STREAM_DUMP, ipfix_classify_stream_dump) \
3064 _(IPFIX_CLASSIFY_TABLE_ADD_DEL, ipfix_classify_table_add_del) \
3065 _(IPFIX_CLASSIFY_TABLE_DUMP, ipfix_classify_table_dump) \
3066 _(SW_INTERFACE_SPAN_ENABLE_DISABLE, sw_interface_span_enable_disable) \
3067 _(SW_INTERFACE_SPAN_DUMP, sw_interface_span_dump) \
3068 _(GET_NEXT_INDEX, get_next_index) \
3069 _(PG_CREATE_INTERFACE,pg_create_interface) \
3070 _(PG_CAPTURE, pg_capture) \
3071 _(PG_ENABLE_DISABLE, pg_enable_disable) \
3072 _(POLICER_ADD_DEL, policer_add_del) \
3073 _(POLICER_DUMP, policer_dump) \
3074 _(POLICER_CLASSIFY_SET_INTERFACE, policer_classify_set_interface) \
3075 _(POLICER_CLASSIFY_DUMP, policer_classify_dump) \
3076 _(IP_SOURCE_AND_PORT_RANGE_CHECK_ADD_DEL, \
3077  ip_source_and_port_range_check_add_del) \
3078 _(IP_SOURCE_AND_PORT_RANGE_CHECK_INTERFACE_ADD_DEL, \
3079  ip_source_and_port_range_check_interface_add_del) \
3080 _(LISP_ENABLE_DISABLE, lisp_enable_disable) \
3081 _(LISP_GPE_ENABLE_DISABLE, lisp_gpe_enable_disable) \
3082 _(LISP_GPE_ADD_DEL_IFACE, lisp_gpe_add_del_iface) \
3083 _(LISP_PITR_SET_LOCATOR_SET, lisp_pitr_set_locator_set) \
3084 _(LISP_MAP_REQUEST_MODE, lisp_map_request_mode) \
3085 _(SHOW_LISP_MAP_REQUEST_MODE, show_lisp_map_request_mode) \
3086 _(LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping) \
3087 _(LISP_ADD_DEL_ADJACENCY, lisp_add_del_adjacency) \
3088 _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS, \
3089  lisp_add_del_map_request_itr_rlocs) \
3090 _(LISP_EID_TABLE_ADD_DEL_MAP, lisp_eid_table_add_del_map) \
3091 _(LISP_ADD_DEL_LOCAL_EID, lisp_add_del_local_eid) \
3092 _(LISP_GPE_ADD_DEL_FWD_ENTRY, lisp_gpe_add_del_fwd_entry) \
3093 _(LISP_ADD_DEL_LOCATOR_SET, lisp_add_del_locator_set) \
3094 _(LISP_ADD_DEL_MAP_RESOLVER, lisp_add_del_map_resolver) \
3095 _(LISP_ADD_DEL_LOCATOR, lisp_add_del_locator) \
3096 _(LISP_EID_TABLE_DUMP, lisp_eid_table_dump) \
3097 _(LISP_EID_TABLE_MAP_DUMP, lisp_eid_table_map_dump) \
3098 _(LISP_EID_TABLE_VNI_DUMP, lisp_eid_table_vni_dump) \
3099 _(LISP_GPE_TUNNEL_DUMP, lisp_gpe_tunnel_dump) \
3100 _(LISP_MAP_RESOLVER_DUMP, lisp_map_resolver_dump) \
3101 _(LISP_MAP_SERVER_DUMP, lisp_map_server_dump) \
3102 _(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump) \
3103 _(LISP_LOCATOR_DUMP, lisp_locator_dump) \
3104 _(LISP_ADJACENCIES_GET, lisp_adjacencies_get) \
3105 _(SHOW_LISP_RLOC_PROBE_STATE, show_lisp_rloc_probe_state) \
3106 _(SHOW_LISP_MAP_REGISTER_STATE, show_lisp_map_register_state) \
3107 _(LISP_RLOC_PROBE_ENABLE_DISABLE, lisp_rloc_probe_enable_disable) \
3108 _(LISP_MAP_REGISTER_ENABLE_DISABLE, lisp_map_register_enable_disable) \
3109 _(IPSEC_GRE_ADD_DEL_TUNNEL, ipsec_gre_add_del_tunnel) \
3110 _(IPSEC_GRE_TUNNEL_DUMP, ipsec_gre_tunnel_dump) \
3111 _(DELETE_SUBIF, delete_subif) \
3112 _(L2_INTERFACE_PBB_TAG_REWRITE, l2_interface_pbb_tag_rewrite) \
3113 _(PUNT, punt) \
3114 _(FLOW_CLASSIFY_SET_INTERFACE, flow_classify_set_interface) \
3115 _(FLOW_CLASSIFY_DUMP, flow_classify_dump) \
3116 _(GET_FIRST_MSG_ID, get_first_msg_id) \
3117 _(IOAM_ENABLE, ioam_enable) \
3118 _(IOAM_DISABLE, ioam_disable) \
3119 _(IP_FIB_DUMP, ip_fib_dump) \
3120 _(IP6_FIB_DUMP, ip6_fib_dump) \
3121 _(FEATURE_ENABLE_DISABLE, feature_enable_disable) \
3122 _(SW_INTERFACE_TAG_ADD_DEL, sw_interface_tag_add_del) \
3123 _(SW_INTERFACE_SET_MTU, sw_interface_set_mtu)
3124  void
3126 {
3127 #define _(n,f) am->msg_print_handlers[VL_API_##n] \
3128  = (void *) vl_api_##f##_t_print;
3130 #undef _
3131 }
3132 
3133 /*
3134  * fd.io coding-style-patch-verification: ON
3135  *
3136  * Local Variables:
3137  * eval: (c-set-style "gnu")
3138  * End:
3139  */
format_function_t format_ip46_address
Definition: format.h:61
static void * vl_api_sw_interface_set_flags_t_print(vl_api_sw_interface_set_flags_t *mp, void *handle)
Definition: custom_dump.c:88
DPDK interface HQoS subport parameters set request.
Definition: vpe.api:4471
static void * vl_api_create_vhost_user_if_t_print(vl_api_create_vhost_user_if_t *mp, void *handle)
Definition: custom_dump.c:1507
static u8 * format_lisp_flat_eid(u8 *s, va_list *args)
Definition: custom_dump.c:2356
static void * vl_api_bridge_domain_add_del_t_print(vl_api_bridge_domain_add_del_t *mp, void *handle)
Definition: custom_dump.c:292
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:1256
static void * vl_api_lisp_add_del_adjacency_t_print(vl_api_lisp_add_del_adjacency_t *mp, void *handle)
Definition: custom_dump.c:2440
static void * vl_api_lisp_gpe_add_del_fwd_entry_t_print(vl_api_lisp_gpe_add_del_fwd_entry_t *mp, void *handle)
Definition: custom_dump.c:2511
Get list of policers.
Definition: vpe.api:3683
DHCP Proxy set / unset vss request.
Definition: vpe.api:608
Proxy ARP add / del request.
Definition: vpe.api:313
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:151
Classify get table IDs request.
Definition: vpe.api:3863
Reset VRF (remove all routes etc) request.
Definition: vpe.api:364
static void * vl_api_mpls_fib_dump_t_print(vl_api_mpls_fib_dump_t *mp, void *handle)
Definition: custom_dump.c:2015
Add / del ipsec gre tunnel request.
Definition: vpe.api:4366
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:2341
L2 FIB add entry request.
Definition: vpe.api:999
cop: enable/disable whitelist filtration features on an interface Note: the supplied fib_id must matc...
Definition: vpe.api:3470
static void * vl_api_sr_tunnel_add_del_t_print(vl_api_sr_tunnel_add_del_t *mp, void *handle)
Definition: custom_dump.c:1034
static void * vl_api_l2tpv3_set_tunnel_cookies_t_print(vl_api_l2tpv3_set_tunnel_cookies_t *mp, void *handle)
Definition: custom_dump.c:1306
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:1367
Register for ip6 nd resolution events.
Definition: vpe.api:2845
u8 * format_hmac_key_id(u8 *s, va_list *args)
Definition: lisp_types.c:362
static void * vl_api_delete_subif_t_print(vl_api_delete_subif_t *mp, void *handle)
Definition: custom_dump.c:717
sll srl srl sll sra u16x4 i
Definition: vector_sse2.h:343
static void * vl_api_l2_patch_add_del_t_print(vl_api_l2_patch_add_del_t *mp, void *handle)
Definition: custom_dump.c:1017
static void * vl_api_lisp_locator_set_dump_t_print(vl_api_lisp_locator_set_dump_t *mp, void *handle)
Definition: custom_dump.c:2610
static void * vl_api_lisp_map_request_mode_t_print(vl_api_lisp_map_request_mode_t *mp, void *handle)
Definition: custom_dump.c:2638
enable/disable LISP RLOC probing
Definition: vpe.api:2169
static void * vl_api_delete_loopback_t_print(vl_api_delete_loopback_t *mp, void *handle)
Definition: custom_dump.c:77
static void * vl_api_reset_vrf_t_print(vl_api_reset_vrf_t *mp, void *handle)
Definition: custom_dump.c:651
Reset fib table request.
Definition: vpe.api:549
IPFIX classify tables dump request.
Definition: vpe.api:4119
#define IP6_SR_HEADER_FLAG_PL_ELT_EGRESS_PE
Flag bits.
Definition: sr_packet.h:211
#define foreach_create_subif_bit
Definition: custom_dump.c:682
static void * vl_api_sw_interface_ip6_set_link_local_address_t_print(vl_api_sw_interface_ip6_set_link_local_address_t *mp, void *handle)
Definition: custom_dump.c:904
static void * vl_api_reset_fib_t_print(vl_api_reset_fib_t *mp, void *handle)
Definition: custom_dump.c:748
add or delete lisp gpe tunnel
Definition: vpe.api:1969
Dump IP fib table.
Definition: ip.api:25
static uword ip46_address_is_multicast(ip46_address_t *a)
Definition: ip6_packet.h:147
static void * vl_api_lisp_add_del_locator_t_print(vl_api_lisp_add_del_locator_t *mp, void *handle)
Definition: custom_dump.c:2593
format_function_t format_ip6_address
Definition: format.h:95
static void * vl_api_cli_inband_t_print(vl_api_cli_inband_t *mp, void *handle)
Definition: custom_dump.c:1621
static void ip46_from_addr_buf(u32 is_ipv6, u8 *buf, ip46_address_t *ip)
Definition: ip6_packet.h:84
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
#define IP6_SR_HEADER_FLAG_PROTECTED
Flag bits.
Definition: sr_packet.h:203
static void * vl_api_ioam_enable_t_print(vl_api_ioam_enable_t *mp, void *handle)
Definition: custom_dump.c:2867
static void * vl_api_lisp_adjacencies_get_t_print(vl_api_lisp_adjacencies_get_t *mp, void *handle)
Definition: custom_dump.c:2713
Set/unset policer classify interface.
Definition: vpe.api:3760
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:2918
configure or disable LISP PITR node
Definition: vpe.api:2124
Set flags on the interface.
Definition: interface.api:9
Control ping from client to api server request.
Definition: vpe.api:679
static void * vl_api_flow_classify_set_interface_t_print(vl_api_flow_classify_set_interface_t *mp, void *handle)
Definition: custom_dump.c:2798
static void * vl_api_interface_name_renumber_t_print(vl_api_interface_name_renumber_t *mp, void *handle)
Definition: custom_dump.c:1690
static void * vl_api_sr_multicast_map_add_del_t_print(vl_api_sr_multicast_map_add_del_t *mp, void *handle)
Definition: custom_dump.c:1149
static void * vl_api_add_node_next_t_print(vl_api_add_node_next_t *mp, void *handle)
Definition: custom_dump.c:1272
static void * vl_api_l2_fib_clear_table_t_print(vl_api_l2_fib_clear_table_t *mp, void *handle)
Definition: custom_dump.c:1465
iOAM disable
Definition: vpe.api:3554
#define L2_FLOOD
Definition: l2_bd.h:110
Set max allowed ARP or ip6 neighbor entries request.
Definition: vpe.api:743
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:2471
Interface set vxlan-bypass request.
Definition: vpe.api:914
static void * vl_api_tap_modify_t_print(vl_api_tap_modify_t *mp, void *handle)
Definition: custom_dump.c:444
static void * vl_api_input_acl_set_interface_t_print(vl_api_input_acl_set_interface_t *mp, void *handle)
Definition: custom_dump.c:1733
#define L2_FWD
Definition: l2_bd.h:109
VXLAN GPE definitions.
static void * vl_api_control_ping_t_print(vl_api_control_ping_t *mp, void *handle)
Definition: custom_dump.c:1590
static void * vl_api_ip_add_del_route_t_print(vl_api_ip_add_del_route_t *mp, void *handle)
Definition: custom_dump.c:486
u8 tap_name[64]
Definition: tap.api:67
static void * vl_api_mpls_tunnel_add_del_t_print(vl_api_mpls_tunnel_add_del_t *mp, void *handle)
Definition: custom_dump.c:575
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:2570
Classify add / del session request.
Definition: vpe.api:1187
IPFIX exporter dump request.
Definition: vpe.api:4021
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Definition: vec.h:482
static void * vl_api_bridge_domain_dump_t_print(vl_api_bridge_domain_dump_t *mp, void *handle)
Definition: custom_dump.c:313
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:2724
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:1491
Dump tap interfaces request.
Definition: tap.api:108
static void * vl_api_flow_classify_dump_t_print(vl_api_flow_classify_dump_t *mp, void *handle)
Definition: custom_dump.c:2836
static void * vl_api_sw_interface_set_dpdk_hqos_tctbl_t_print(vl_api_sw_interface_set_dpdk_hqos_tctbl_t *mp, void *handle)
Definition: custom_dump.c:277
static void * vl_api_want_interface_events_t_print(vl_api_want_interface_events_t *mp, void *handle)
Definition: custom_dump.c:1600
static void * vl_api_sw_interface_clear_stats_t_print(vl_api_sw_interface_clear_stats_t *mp, void *handle)
Definition: custom_dump.c:1991
static void * vl_api_gre_add_del_tunnel_t_print(vl_api_gre_add_del_tunnel_t *mp, void *handle)
Definition: custom_dump.c:1426
Request for lisp_eid_table_map_details.
Definition: vpe.api:2613
Add/Delete classification table request.
Definition: vpe.api:1132
IPv6 router advertisement config request.
Definition: ip.api:213
L2 bridge domain request operational state details.
Definition: vpe.api:2925
Dump MPLS fib table.
Definition: vpe.api:142
static void * vl_api_tap_delete_t_print(vl_api_tap_delete_t *mp, void *handle)
Definition: custom_dump.c:464
Enable / disable packet generator request.
Definition: vpe.api:4272
static void * vl_api_ipsec_gre_tunnel_dump_t_print(vl_api_ipsec_gre_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:2762
static void * vl_api_classify_add_del_table_t_print(vl_api_classify_add_del_table_t *mp, void *handle)
Definition: custom_dump.c:1172
static void * vl_api_dhcp_proxy_set_vss_t_print(vl_api_dhcp_proxy_set_vss_t *mp, void *handle)
Definition: custom_dump.c:827
vhost-user interface create request
Definition: vpe.api:1616
format_function_t format_ip4_address
Definition: format.h:79
Dump IP6 fib table.
Definition: ip.api:75
static void * vl_api_vxlan_gpe_add_del_tunnel_t_print(vl_api_vxlan_gpe_add_del_tunnel_t *mp, void *handle)
Definition: custom_dump.c:1651
static void * vl_api_bridge_flags_t_print(vl_api_bridge_flags_t *mp, void *handle)
Definition: custom_dump.c:375
static void * vl_api_l2tpv3_interface_enable_disable_t_print(vl_api_l2tpv3_interface_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:1324
add or delete gpe_iface
Definition: vpe.api:2098
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:561
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:203
static void * vl_api_proxy_arp_add_del_t_print(vl_api_proxy_arp_add_del_t *mp, void *handle)
Definition: custom_dump.c:542
static void * vl_api_ip_dump_t_print(vl_api_ip_dump_t *mp, void *handle)
Definition: custom_dump.c:1763
static void * vl_api_l2fib_add_del_t_print(vl_api_l2fib_add_del_t *mp, void *handle)
Definition: custom_dump.c:327
static void * vl_api_l2_flags_t_print(vl_api_l2_flags_t *mp, void *handle)
Definition: custom_dump.c:357
static void * vl_api_create_vlan_subif_t_print(vl_api_create_vlan_subif_t *mp, void *handle)
Definition: custom_dump.c:667
static void * vl_api_lisp_enable_disable_t_print(vl_api_lisp_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2316
static void * vl_api_oam_add_del_t_print(vl_api_oam_add_del_t *mp, void *handle)
Definition: custom_dump.c:728
Dump ipsec gre tunnel table.
Definition: vpe.api:4392
add or delete LISP adjacency adjacency
Definition: vpe.api:2341
u8 pcap_file_name[pcap_name_length]
Definition: vpe.api:4253
PacketGenerator capture packets on given interface request.
Definition: vpe.api:4245
u8 mac_address[6]
Definition: tap.api:68
static void * vl_api_vxlan_gpe_tunnel_dump_t_print(vl_api_vxlan_gpe_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1678
static void * vl_api_ipfix_classify_stream_dump_t_print(vl_api_ipfix_classify_stream_dump_t *mp, void *handle)
Definition: custom_dump.c:2134
static void * vl_api_ip_fib_dump_t_print(vl_api_ip_fib_dump_t *mp, void *handle)
Definition: custom_dump.c:2025
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:2685
u8 * format_ethernet_address(u8 *s, va_list *args)
Definition: format.c:44
Proxy ARP add / del request.
Definition: vpe.api:339
Clear interface statistics.
Definition: interface.api:292
static void * vl_api_memclnt_create_t_print(vl_api_memclnt_create_t *mp, void *handle)
Definition: custom_dump.c:1631
static void * vl_api_l2tpv3_set_lookup_key_t_print(vl_api_l2tpv3_set_lookup_key_t *mp, void *handle)
Definition: custom_dump.c:1339
static void * vl_api_dhcp_proxy_config_t_print(vl_api_dhcp_proxy_config_t *mp, void *handle)
Definition: custom_dump.c:764
DHCP Proxy config 2 add / del request.
Definition: vpe.api:1328
Classify sessions dump request.
Definition: vpe.api:3956
static u8 * format_policer_action(u8 *s, va_list *va)
Definition: custom_dump.c:1833
Set interface source and L4 port-range request.
Definition: vpe.api:4335
unsigned long long u32x4
Definition: ixge.c:28
static void * vl_api_get_next_index_t_print(vl_api_get_next_index_t *mp, void *handle)
Definition: custom_dump.c:2208
u32 feature_bitmap
Definition: vpe.api:1035
static void * vl_api_ip_address_dump_t_print(vl_api_ip_address_dump_t *mp, void *handle)
Definition: custom_dump.c:1751
#define L2_UU_FLOOD
Definition: l2_bd.h:111
static void * vl_api_policer_dump_t_print(vl_api_policer_dump_t *mp, void *handle)
Definition: custom_dump.c:1936
u8 tap_name[64]
Definition: tap.api:34
add or delete map request itr rlocs
Definition: vpe.api:2370
#define clib_warning(format, args...)
Definition: error.h:59
Delete host-interface.
Definition: vpe.api:3604
Set/unset input ACL interface.
Definition: vpe.api:3011
#define vec_resize(V, N)
Resize a vector (no header, unspecified alignment) Add N elements to end of given vector V...
Definition: vec.h:201
static void * vl_api_set_ipfix_classify_stream_t_print(vl_api_set_ipfix_classify_stream_t *mp, void *handle)
Definition: custom_dump.c:2121
static void * vl_api_lisp_eid_table_dump_t_print(vl_api_lisp_eid_table_dump_t *mp, void *handle)
Definition: custom_dump.c:2659
static void * vl_api_sw_interface_set_table_t_print(vl_api_sw_interface_set_table_t *mp, void *handle)
Definition: custom_dump.c:133
Initialize a new tap interface with the given paramters.
Definition: tap.api:29
Dump mpls eth tunnel table.
Definition: vpe.api:272
static void * vl_api_want_ip6_nd_events_t_print(vl_api_want_ip6_nd_events_t *mp, void *handle)
Definition: custom_dump.c:1719
static void * vl_api_sw_interface_set_unnumbered_t_print(vl_api_sw_interface_set_unnumbered_t *mp, void *handle)
Definition: custom_dump.c:599
#define IP6_SR_HEADER_FLAG_CLEANUP
Flag bits.
Definition: sr_packet.h:201
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:2261
Dump l2 fib (aka bridge domain) table.
Definition: vpe.api:1793
Configure IP source and L4 port-range check.
Definition: vpe.api:4304
Delete tap interface.
Definition: tap.api:90
Set L2 flags request !!! TODO - need more info, feature bits in l2_input.h.
Definition: vpe.api:1029
L2 fib clear table request, clear all mac entries in the l2 fib.
Definition: vpe.api:1433
Enable/Disable span to mirror traffic from one interface to another.
Definition: span.api:24
static void * vl_api_pg_create_interface_t_print(vl_api_pg_create_interface_t *mp, void *handle)
Definition: custom_dump.c:2220
static void * vl_api_sw_interface_set_vpath_t_print(vl_api_sw_interface_set_vpath_t *mp, void *handle)
Definition: custom_dump.c:166
Set interface MTU.
Definition: interface.api:36
The Segment Routing Header (SRH).
set LISP map-request mode.
Definition: vpe.api:2237
IPv6 segment routing tunnel add / del request.
Definition: vpe.api:803
IPv6 segment routing multicast map to policy add / del request.
Definition: vpe.api:864
static void * vl_api_sw_interface_span_dump_t_print(vl_api_sw_interface_span_dump_t *mp, void *handle)
Definition: custom_dump.c:2197
Request for LISP adjacencies.
Definition: vpe.api:2590
Set/unset l2 classification tables for an interface request.
Definition: vpe.api:1245
Set bridge domain ip to mac entry request.
Definition: vpe.api:1087
u8 stream_name[stream_name_length]
Definition: vpe.api:4278
add or delete lisp eid-table
Definition: vpe.api:1926
static void * vl_api_gre_tunnel_dump_t_print(vl_api_gre_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1453
static void * vl_api_classify_add_del_session_t_print(vl_api_classify_add_del_session_t *mp, void *handle)
Definition: custom_dump.c:1206
static void * vl_api_ip6_fib_dump_t_print(vl_api_ip6_fib_dump_t *mp, void *handle)
Definition: custom_dump.c:2035
u8 l4_protocol
Definition: vpe.api:4565
static void * vl_api_ip_neighbor_add_del_t_print(vl_api_ip_neighbor_add_del_t *mp, void *handle)
Definition: custom_dump.c:616
static void * vl_api_cop_whitelist_enable_disable_t_print(vl_api_cop_whitelist_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:1789
Get list of flow classify interfaces and tables.
Definition: vpe.api:4171
static void * vl_api_lisp_gpe_add_del_iface_t_print(vl_api_lisp_gpe_add_del_iface_t *mp, void *handle)
Definition: custom_dump.c:2327
static void * vl_api_af_packet_delete_t_print(vl_api_af_packet_delete_t *mp, void *handle)
Definition: custom_dump.c:1822
static void * vl_api_lisp_gpe_enable_disable_t_print(vl_api_lisp_gpe_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2539
static void * vl_api_pg_enable_disable_t_print(vl_api_pg_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2247
Set or delete one or all ip addresses on a specified interface.
Definition: interface.api:172
Enable or Disable MPLS on and interface.
Definition: vpe.api:62
IOAM enable : Enable in-band OAM.
Definition: vpe.api:3527
static void * vl_api_af_packet_create_t_print(vl_api_af_packet_create_t *mp, void *handle)
Definition: custom_dump.c:1807
Call from VLIB_INIT_FUNCTION to set the Linux kernel inject node name.
Classify table info.
Definition: vpe.api:3917
static void * vl_api_modify_vhost_user_if_t_print(vl_api_modify_vhost_user_if_t *mp, void *handle)
Definition: custom_dump.c:1525
static void * vl_api_classify_table_by_interface_t_print(vl_api_classify_table_by_interface_t *mp, void *handle)
Definition: custom_dump.c:2055
static void * vl_api_show_version_t_print(vl_api_show_version_t *mp, void *handle)
Definition: custom_dump.c:1641
static void * vl_api_set_ip_flow_hash_t_print(vl_api_set_ip_flow_hash_t *mp, void *handle)
Definition: custom_dump.c:871
IPFIX classify stream configure request.
Definition: vpe.api:4055
static void * vl_api_lisp_locator_dump_t_print(vl_api_lisp_locator_dump_t *mp, void *handle)
Definition: custom_dump.c:2624
u8 mac_address[6]
Definition: tap.api:35
PacketGenerator create interface request.
Definition: vpe.api:4219
static void * vl_api_lisp_add_del_map_resolver_t_print(vl_api_lisp_add_del_map_resolver_t *mp, void *handle)
Definition: custom_dump.c:2521
Set the ip flow hash config for a fib request.
Definition: ip.api:172
static void * vl_api_create_loopback_t_print(vl_api_create_loopback_t *mp, void *handle)
Definition: custom_dump.c:66
enable or disable LISP feature
Definition: vpe.api:2076
Create host-interface.
Definition: vpe.api:3578
static void * vl_api_policer_add_del_t_print(vl_api_policer_add_del_t *mp, void *handle)
Definition: custom_dump.c:1861
static void * vl_api_dhcp_proxy_config_2_t_print(vl_api_dhcp_proxy_config_2_t *mp, void *handle)
Definition: custom_dump.c:795
cop: enable/disable junk filtration features on an interface
Definition: vpe.api:3439
static void * vl_api_cop_interface_enable_disable_t_print(vl_api_cop_interface_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:1774
Set/unset the classification table for an interface request.
Definition: vpe.api:1218
static void * vl_api_l2_interface_pbb_tag_rewrite_t_print(vl_api_l2_interface_pbb_tag_rewrite_t *mp, void *handle)
Definition: custom_dump.c:2775
DPDK interface HQoS tctbl entry set request.
Definition: vpe.api:4499
static void * vl_api_policer_classify_dump_t_print(vl_api_policer_classify_dump_t *mp, void *handle)
Definition: custom_dump.c:1967
static void * vl_api_lisp_map_register_enable_disable_t_print(vl_api_lisp_map_register_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2699
SPAN dump request.
Definition: span.api:44
#define FINISH
Definition: custom_dump.c:58
static void * vl_api_set_ipfix_exporter_t_print(vl_api_set_ipfix_exporter_t *mp, void *handle)
Definition: custom_dump.c:2091
Feature path enable/disable request.
Definition: vpe.api:4640
#define IP6_SR_HEADER_FLAG_PL_ELT_ORIG_SRC_ADDR
Flag bits.
Definition: sr_packet.h:213
static void * vl_api_ip_source_and_port_range_check_interface_add_del_t_print(vl_api_ip_source_and_port_range_check_interface_add_del_t *mp, void *handle)
Definition: custom_dump.c:2288
#define IP6_SR_HEADER_FLAG_PL_ELT_NOT_PRESENT
Flag bits.
Definition: sr_packet.h:207
add or delete map-resolver
Definition: vpe.api:2030
static void * vl_api_ipsec_gre_add_del_tunnel_t_print(vl_api_ipsec_gre_add_del_tunnel_t *mp, void *handle)
Definition: custom_dump.c:2739
Set/unset flow classify interface.
Definition: vpe.api:4148
static void * vl_api_lisp_add_del_local_eid_t_print(vl_api_lisp_add_del_local_eid_t *mp, void *handle)
Definition: custom_dump.c:2488
Delete sub interface request.
Definition: vpe.api:4420
void vl_msg_api_custom_dump_configure(api_main_t *am)
Definition: custom_dump.c:3125
Request for map lisp locator status.
Definition: vpe.api:2423
Delete loopback interface request.
Definition: vpe.api:658
vhost-user interface modify request
Definition: vpe.api:1646
Register for interface events.
Definition: interface.api:60
Set L2 XConnect between two interfaces request.
Definition: vpe.api:940
static void * vl_api_ipfix_classify_table_add_del_t_print(vl_api_ipfix_classify_table_add_del_t *mp, void *handle)
Definition: custom_dump.c:2144
IP neighbor add / del request.
Definition: ip.api:136
static void * vl_api_ioam_disable_t_print(vl_api_ioam_disable_t *mp, void *handle)
Definition: custom_dump.c:2889
static void * vl_api_create_subif_t_print(vl_api_create_subif_t *mp, void *handle)
Definition: custom_dump.c:693
unsigned int u32
Definition: types.h:88
Request for eid table summary status.
Definition: vpe.api:2542
static void * vl_api_dhcp_client_config_t_print(vl_api_dhcp_client_config_t *mp, void *handle)
Definition: custom_dump.c:849
enable/disable LISP map-register
Definition: vpe.api:2191
Request for locator_set summary status.
Definition: vpe.api:2471
Get list of policer classify interfaces and tables.
Definition: vpe.api:3786
map/unmap vni/bd_index to vrf
Definition: vpe.api:2396
static void * vl_api_vxlan_add_del_tunnel_t_print(vl_api_vxlan_add_del_tunnel_t *mp, void *handle)
Definition: custom_dump.c:1377
MPLS tunnel Add / del route.
Definition: vpe.api:240
IPv6 router advertisement prefix config request.
Definition: ip.api:258
static void * vl_api_sw_interface_set_dpdk_hqos_subport_t_print(vl_api_sw_interface_set_dpdk_hqos_subport_t *mp, void *handle)
Definition: custom_dump.c:257
u16 l4_port
Definition: vpe.api:4566
Set the next node for a given node request.
Definition: vpe.api:1297
Query relative index via node names.
Definition: vpe.api:4194
static void * vl_api_classify_session_dump_t_print(vl_api_classify_session_dump_t *mp, void *handle)
Definition: custom_dump.c:2079
show version
Definition: vpe.api:1718
add or delete locator_set
Definition: vpe.api:1856
static void * vl_api_get_first_msg_id_t_print(vl_api_get_first_msg_id_t *mp, void *handle)
Definition: custom_dump.c:2857
#define foreach_custom_print_function
Definition: custom_dump.c:2963
OAM add / del target request.
Definition: vpe.api:523
static void * vl_api_lisp_add_del_map_request_itr_rlocs_t_print(vl_api_lisp_add_del_map_request_itr_rlocs_t *mp, void *handle)
Definition: custom_dump.c:2456
static void * vl_api_sw_interface_add_del_address_t_print(vl_api_sw_interface_add_del_address_t *mp, void *handle)
Definition: custom_dump.c:109
#define IP6_SR_HEADER_FLAG_PL_ELT_INGRESS_PE
Flag bits.
Definition: sr_packet.h:209
Classify table ids by interface index request.
Definition: vpe.api:3887
typedef CLIB_PACKED(struct{u8 is_ip4;u8 priority;u8 weight;u8 addr[16];})
Used for transferring locators via VPP API.
Definition: custom_dump.c:2375
static void * vl_api_set_arp_neighbor_limit_t_print(vl_api_set_arp_neighbor_limit_t *mp, void *handle)
Definition: custom_dump.c:1002
static void * vl_api_want_ip4_arp_events_t_print(vl_api_want_ip4_arp_events_t *mp, void *handle)
Definition: custom_dump.c:1705
static void * vl_api_tap_connect_t_print(vl_api_tap_connect_t *mp, void *handle)
Definition: custom_dump.c:424
Add / del route request.
Definition: ip.api:360
static void * vl_api_classify_set_interface_ip_table_t_print(vl_api_classify_set_interface_ip_table_t *mp, void *handle)
Definition: custom_dump.c:1240
static void * vl_api_classify_table_ids_t_print(vl_api_classify_table_ids_t *mp, void *handle)
Definition: custom_dump.c:2045
Interface bridge mode request.
Definition: vpe.api:968
static void * vl_api_sw_interface_set_mtu_t_print(vl_api_sw_interface_set_mtu_t *mp, void *handle)
Definition: custom_dump.c:2933
unsigned short u16
Definition: types.h:57
static void * vl_api_l2_interface_efp_filter_t_print(vl_api_l2_interface_efp_filter_t *mp, void *handle)
Definition: custom_dump.c:1475
static void * vl_api_bd_ip_mac_add_del_t_print(vl_api_bd_ip_mac_add_del_t *mp, void *handle)
Definition: custom_dump.c:402
static void * vl_api_sr_policy_add_del_t_print(vl_api_sr_policy_add_del_t *mp, void *handle)
Definition: custom_dump.c:1109
static void * vl_api_pg_capture_t_print(vl_api_pg_capture_t *mp, void *handle)
Definition: custom_dump.c:2231
unsigned char u8
Definition: types.h:56
static void * vl_api_delete_vhost_user_if_t_print(vl_api_delete_vhost_user_if_t *mp, void *handle)
Definition: custom_dump.c:1542
#define L2_ARP_TERM
Definition: l2_bd.h:112
Process a vpe parser cli string request.
Definition: vpe.api:704
add or delete locator for locator_set
Definition: vpe.api:1887
Configure IPFIX exporter process request.
Definition: vpe.api:3995
static void * vl_api_lisp_add_del_remote_mapping_t_print(vl_api_lisp_add_del_remote_mapping_t *mp, void *handle)
Definition: custom_dump.c:2403
L2 interface ethernet flow point filtering enable/disable request.
Definition: vpe.api:1455
static void * vl_api_sw_interface_set_l2_bridge_t_print(vl_api_sw_interface_set_l2_bridge_t *mp, void *handle)
Definition: custom_dump.c:222
static void * vl_api_sw_interface_set_vxlan_bypass_t_print(vl_api_sw_interface_set_vxlan_bypass_t *mp, void *handle)
Definition: custom_dump.c:183
static void * vl_api_ipfix_classify_table_dump_t_print(vl_api_ipfix_classify_table_dump_t *mp, void *handle)
Definition: custom_dump.c:2158
Create loopback interface request.
Definition: vpe.api:634
Set unnumbered interface add / del request.
Definition: interface.api:268
add or delete remote static mapping
Definition: vpe.api:2301
L2 interface vlan tag rewrite configure request.
Definition: vpe.api:1588
Create a new subinterface with the given vlan id.
Definition: vpe.api:36
static void * vl_api_sw_interface_set_dpdk_hqos_pipe_t_print(vl_api_sw_interface_set_dpdk_hqos_pipe_t *mp, void *handle)
Definition: custom_dump.c:242
L2 interface patch add / del request.
Definition: vpe.api:768
Interface set vpath request.
Definition: vpe.api:889
static void * vl_api_ipfix_exporter_dump_t_print(vl_api_ipfix_exporter_dump_t *mp, void *handle)
Definition: custom_dump.c:2111
static void * vl_api_sw_interface_tap_dump_t_print(vl_api_sw_interface_tap_dump_t *mp, void *handle)
Definition: custom_dump.c:475
Modify a tap interface with the given paramters.
Definition: tap.api:61
Add/del policer.
Definition: vpe.api:3642
static void * vl_api_mpls_tunnel_dump_t_print(vl_api_mpls_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:2003
L2 interface pbb tag rewrite configure request.
Definition: vpe.api:4529
u8 * format(u8 *s, const char *fmt,...)
Definition: format.c:418
static void * vl_api_l2_fib_table_dump_t_print(vl_api_l2_fib_table_dump_t *mp, void *handle)
Definition: custom_dump.c:1578
static void * vl_api_cli_request_t_print(vl_api_cli_request_t *mp, void *handle)
Definition: custom_dump.c:1611
Register for ip4 arp resolution events.
Definition: vpe.api:2799
DPDK interface HQoS pipe profile set request.
Definition: vpe.api:4443
static void * vl_api_sw_interface_dump_t_print(vl_api_sw_interface_dump_t *mp, void *handle)
Definition: custom_dump.c:1563
Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM) request...
Definition: vpe.api:1057
static void * vl_api_punt_t_print(vl_api_punt_t *mp, void *handle)
Definition: custom_dump.c:2815
enable or disable lisp-gpe protocol
Definition: vpe.api:2054
IPFIX classify stream dump request.
Definition: vpe.api:4075
vhost_vring_addr_t addr
Definition: vhost-user.h:81
vhost-user interface delete request
Definition: vpe.api:1670
static void * vl_api_sw_interface_ip6nd_ra_config_t_print(vl_api_sw_interface_ip6nd_ra_config_t *mp, void *handle)
Definition: custom_dump.c:956
u32 flags
Definition: vhost-user.h:75
static void * vl_api_l2tpv3_create_tunnel_t_print(vl_api_l2tpv3_create_tunnel_t *mp, void *handle)
Definition: custom_dump.c:1284
Set / clear software interface tag.
Definition: interface.api:316
l2tpv3 tunnel interface create request
Definition: vpe.api:1363
static void * vl_api_sw_interface_span_enable_disable_t_print(vl_api_sw_interface_span_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2168
#define foreach_custom_print_no_arg_function
Definition: custom_dump.c:2944
#define L2_LEARN
Definition: l2_bd.h:108
Associate the specified interface with a fib table.
Definition: interface.api:201
static void * vl_api_feature_enable_disable_t_print(vl_api_feature_enable_disable_t *mp, void *handle)
Definition: custom_dump.c:2903
DHCP Client config add / del request.
Definition: vpe.api:2979
Punt traffic to the host.
Definition: vpe.api:4560
IPFIX add or delete classifier table request.
Definition: vpe.api:4098
static void * vl_api_sw_interface_ip6nd_ra_prefix_t_print(vl_api_sw_interface_ip6nd_ra_prefix_t *mp, void *handle)
Definition: custom_dump.c:919
static void * vl_api_policer_classify_set_interface_t_print(vl_api_policer_classify_set_interface_t *mp, void *handle)
Definition: custom_dump.c:1948
static void * vl_api_vxlan_tunnel_dump_t_print(vl_api_vxlan_tunnel_dump_t *mp, void *handle)
Definition: custom_dump.c:1414
static int ip6_sr_policy_list_flags(u16 flags_host_byte_order, int pl_index)
pl_index is one-origined
Definition: sr_packet.h:230
DHCP Proxy config add / del request.
Definition: vpe.api:577
static void * vl_api_sw_interface_vhost_user_dump_t_print(vl_api_sw_interface_vhost_user_dump_t *mp, void *handle)
Definition: custom_dump.c:1553
static void * vl_api_classify_table_info_t_print(vl_api_classify_table_info_t *mp, void *handle)
Definition: custom_dump.c:2067
L2 bridge domain add or delete request.
Definition: vpe.api:2896
IPv6 segment routing policy add / del request.
Definition: vpe.api:838