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