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